This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PING^2] RFC [PATCH] BZ#1077902: New API gettimezone


  Hi,

> On Wednesday, 30 April 2014 5:07 AM, Paul Eggert <eggert@cs.ucla.edu> wrote:
> The TZ string contains a prediction of DST behavior after the rest of 
> the zoneinfo file's history expires; in general it's incorrect to use 
> this string at other times.  For example, the TZ string at the end of 
> America/Sao_Paolo is "BRT3BRST,M10.3.0/0,M2.3.0/0", which corresponds 
> to our best guess for what happens after the year 2038.  Unfortunately, 
> this guess is known to be wrong next year, as Sao Paolo is scheduled to 
> switch back to standard time on 2015-02-22, not on 2015-02-15.  So 
> shipping TZ="BRT3BRST,M10.3.0/0,M2.3.0/0" to a remote site will 
> mishandle many time stamps in Brazil.

  Sorry, it's confusing. What is the problem here? It sounds more of incorrect or buggy time zone file. Which is a different issue. We can not deem TZ variable unreliable for it.

>> Because if without the TZ string or with TZ=UTC0, <time.h> APIs can 
> provide accurate UTC times, then all TZ definition helping us with is the 
> offsets and time frame within an year.
> 
> Sorry, I don't understand this comment.

  TZ variable provides offsets which are added to the UTC times to get the local time, right?
 
> I'm afraid no other option is available or possible under reasonable 

> constraints, if the goal is to have gmtime->localtime conversion on the 
> remote host exactly match gmtime->localtime conversion with TZ unset on 
> the local host even if the two hosts don't have identical tz setups.

  From where did you gather this? Goal is to make local system time zone definition available to processes running inside of a chroot(2) jail; On the same host.

---
Regards
   -Prasad
http://feedmug.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]