[Ecls-list] Datetime bug (gmt?)
Stas Boukarev
stassats at gmail.com
Fri Aug 3 05:58:43 UTC 2012
Stanislav Frolov <frolosofsky at gmail.com> writes:
>>What is the value of localtime() and gmtime() in your
>>system?
>
> localtime(0):
> tm_sec 0
> tm_min 0
> tm_hour 3
> tm_mday 1
> tm_mon 0
> tm_year 70
> tm_wday 4
> tm_yday 0
> tm_stdst 0
>
> gmtime(0):
> tm_sec 0
> tm_min 0
> tm_hour 0
> tm_mday 1
> tm_mon 0
> tm_year 70
> tm_wday 4
> tm_yday 0
> tm_stdst 0
>
> Looks like localtime returns 3 hours instead of 4.
> And datetimes for current time_t:
>
> localtime(NOW):
> tm_sec 46
> tm_min 15
> tm_hour 9
> tm_mday 3
> tm_mon 7
> tm_year 112
> tm_wday 5
> tm_yday 215
> tm_stdst 0
>
> gmtime(NOW):
> tm_sec 46
> tm_min 15
> tm_hour 5
> tm_mday 3
> tm_mon 7
> tm_year 112
> tm_wday 5
> tm_yday 215
> tm_stdst 0
>
> Difference between gmtime and localtime is 4 hours. Bug? Feature?
Well, the difference between 1 January 1970 GMT and 1 January 1970 MSK
is 3 hours.
--
With best regards, Stas.
More information about the ecl-devel
mailing list