[Gambas-user] CDate Documentation

Benoit Minisini benoit.minisini at gambas-basic.org
Mon Nov 14 00:27:26 CET 2022


Le 13/11/2022 à 23:20, Jussi Lahtinen a écrit :
> If this really wasn't obvious, then here, the common way:
> iTimeStamp = (iYear - 1900) * 31556926 + iMonth * 2629743 + iDay * 86400 
> + and so on...
> 
> No need to put a timezone anywhere. Just like with a paper calendar. 
> Unless you need/want to specify it.
> 
> 
> Jussi
> 

A timestamp, which the Gambas 'Date' datatype is, must represent the 
same physical moment, whereever the program using it runs, so that it 
can be freely moved over the Internet.

Your timestamp computation return different values with different 
timezones for the same physical moment. So it is useless as a timestamp.

-- 
Benoît Minisini.



More information about the User mailing list