[tz] Adapting localtime.c
cs at innolan.dk
Sat Oct 8 17:27:52 UTC 2016
I am trying to adapt the tz code to a local system without any timezone
database (AmigaOS). I got the code up and running and everything seems
to work as intended. But one thing about the code puzzles me.
I need to implement "time_t time(time_t *p)" which is the very last part
of localtime.c. Should this code return time as local time or as GMT
time ? Because I cannot get the time calculations to work properly.
I use tzsetwall() to guess the timezone from the systems locale zone
information (GMT+1, etc) and tzset() to load timezone from the TZ
environment variable. Should "time_t time(time_t *p)" try to compensate
if lclptr is set, or should it always just return the plain system time?
I hope someone knows the answer and also thank you for any
clarifications on this issue.
More information about the tz