[Gambas-user] CDate Documentation
claus.dietrich at freenet.de
Fri Nov 11 18:29:18 CET 2022
From my humble point of view the documentation of CDate on
http://gambaswiki.org/wiki/lang/cdate has a few issues:
1. CDate converts the date to UTC, when the argument contains a date and
time component. This fact is not mentioned.
2. The UTC-Offset is always the current UTC-Offset - even if the offset
at given date/point of time is supposed to be different.
Example for the time zone Berlin/Germany:
Print CDate("11/11/2022 13:00:00") -> 11.11.2022 14:00:00
Print CDate("08/11/2022 13:00:00") -> 11.08.2022 14:00:00 (should
actually be 15:00:00)
I don't regard this as a bug, but it is important to know. An according
information would be helpful.
3. The provided example may mislead the reader, because it doesn't show
4. There is only an indirect mentioning about the mandatory format of
the date component, which must be the US-format mm/dd/yyyy. I suggest to
provide an according information.
5. The example should have provided a day > 12 to indicate where the day
has to be placed.
6. The "run" example is irritating, because in my case it shows a
different result - dd/mm/yyyy instead of dd/mm/yyyy. The reason may be
found in the following point.
7. The result of Print CDate(..) depends on the locale of the platform.
Hence the result of Print CDate on the GambasWiki depends on the time
zone and locale of the server platform. That means, that visitors may
get a different result on their local platform - because of a different
time zone and locale.
I suggest an according revision of that wiki page.
More information about the User