[tz] Regarding changes of time format the Philippines

Zefram zefram at fysh.org
Wed Nov 1 20:12:55 UTC 2017

Arati Sethy wrote:
>u_int64_t time = sysMilliTime();
>struct tm *evTime;
>evTime = localtime(&time);

Here's your problem.  localtime() operates on a time_t, the value of
which you need to get from time() or from the .tv_sec part of what you
get from gettimeofday().  Instead you've taken a correct .tv_sec and
multiplied it by 1000.  Instead of asking about November 2017 you've
asked about October 49804.  A zero offset is still not what the tzdb
projects for 49804, but localtime() can be forgiven for giving up.


More information about the tz mailing list