[tz] [PATCH] Introduce Epoch offset and local time Epoch
eggert at cs.ucla.edu
Wed Oct 26 08:35:52 UTC 2016
Guy Harris wrote:
> 1) Is this only a debugging feature?
> 2) Is it intended only to be used on platforms that provide a native time() call and only to map that result to a seconds-since-the-Un*x-Epoch value of a specified integral type (which might not be the OS's time_t type, so it could be used even on UN*X), rather than to be used as a wrapper around whatever the OS's "native" "what's the current date and time of day" API is?
> If 1) isn't (is no longer?) true, the comment in private.h should probably be updated.
The "debugging feature" is when you compile with -Dtime_tz=T. Substituting the
'time' function is done either because this debugging feature is enabled, or
because you're on a system where the epoch is localtime or doesn't use 1970. The
comment in private.h is only about the debugging feature. The comment in
localtime.c is about substituting the 'time' function. Perhaps the wording in
the two comments could be improved....
More information about the tz