[Gambas-user] Best way converting dates into strings forth and back
Rolf-Werner Eilert
rwe-sse at osnanet.de
Fri Dec 10 16:05:21 CET 2021
Am 10.12.21 um 14:59 schrieb Jussi Lahtinen:
> You must use CStr() and CDate(), so that you store and retrieve
> dates as
> a string in UTC format.
>
>
> That doesn't really help.
> Let's say my clock says it's 13:00 and I store it in UTC, which makes it
> 12:00.
> Now, if I restart my program after timezone madness event
> <https://en.wikipedia.org/wiki/Daylight_saving_time> then suddenly the
> 12:00 UTC is interpreted in my computer as something else than what I
> originally stored, example 14:00.
> Thus that is useful only, if we could avoid the automatic conversions
> from the UTC in every case. IE never show the time in a local way.
> Otherwise, the time I stored is not the time I tried to store.
>
> Jussi
>
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
I try to avoid this, but in my case, storing the date was the more
important part.
This very project is a time calendar for my office. The only time I have
to store is that of the dates (when will it start and for how long).
That is always local time, not UTC, but in this case can be saved as a
separate piece of information anyway.
Regards
Rolf
More information about the User
mailing list