[Gambas-user] Best way converting dates into strings forth and back

Jussi Lahtinen jussi.lahtinen at gmail.com
Fri Dec 10 20:14:30 CET 2021


You are confusing strings with dates.
>

No, it applies to the situation in every possible format (string, integers,
etc), if the timezone information is not included, but assumed.



> Rolf-Werner wanted to store a date using a string. So we don't care if
> the timezone when reading is not the same as the timezone when writing.
>
> It will still be the same date.
>

No, it depends completely on the local timezone. 12:00 UTC is assumed to be
14:00 in one zone and 23:00 in another, etc, when in fact you stored 13:00.
I know it is confusing, but I have struggled with this issue for a very
long time without getting any decent solution for it.

There are two cases here.
1. The program is not running when the timezone changes.
2. The program is running when the timezone changes.

These cases create different bugs.


Jussi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20211210/40c5394c/attachment.htm>


More information about the User mailing list