[Gambas-user] CDate Documentation

Benoit Minisini benoit.minisini at gambas-basic.org
Wed Nov 16 20:27:56 CET 2022

Le 16/11/2022 à 15:06, Jussi Lahtinen a écrit :
>       "Internally, the date is stored in UTC."
>       - Benoît Minisini Sun, Oct 27, 2019, 8:26 PM

It's actually not really true, it's a simplification.

To be exact, a Date instant is stored as a duration between the instant 
and another pre-defined instant in the past.

That duration is stored as a number of days (all supposed to be equal to 
86,400 seconds, which is an approximation), and a number of microseconds.

The pre-defined instant is a specific day in the past (see it as as a 
number of days backwards from the first day of the Gregorian calendar), 
and at midnight, in UTC.

This is why I summarized that by "the date is stored in UTC.".

But that pre-defined instant could have been anything else.


Benoît Minisini.

More information about the User mailing list