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

Jussi Lahtinen jussi.lahtinen at gmail.com
Fri Dec 10 21:50:33 CET 2021


More clarification.
This is a problem in design not in the implementation. The same problem
occurs with paper and pen, unless you always assume local time. IE never do
any conversions.
Currently, I don't see a decent solution to avoid the conversions.

Jussi

On Fri, Dec 10, 2021 at 10:36 PM Jussi Lahtinen <jussi.lahtinen at gmail.com>
wrote:

> Again, you are confusing date/time (which are absolute) with their
>> string representation (which are not).
>>
>
> No.
> Consider this. If I store date 10.12.2021 22:27 in UTC right now (winter),
> I will get: 12/10/2021 20:27 UTC.
> If I store *the same* date in UTC in *summer*, I will get: 12/10/2021
> 19:27 UTC.
>
> So, if I look at this date in local time in summer or in winter I will see
> two different times.
>
> The second case.
> If I assume all dates are always local time. Then everything is again
> ruined if the program is running during the timezone change.
>
>
> Jussi
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20211210/af6ca746/attachment.htm>


More information about the User mailing list