TZ database content

Christoph Bugel cbugel at netvision.net.il
Fri Feb 9 19:27:38 UTC 2001


Interesting. We were thinking about a similar approach, in our case we did not
necessarily care about having identical names. Rather, we want to use the
tzcode implementations of localtime() and mktime() instead of the ones provided
with the OS(**), This would then require us to have tzdata around, and since
our code must work windoze as well, we need to provide a tzdata with the
product. (tzcode can't read from the registry :).

(**) the reason we thought about using localtime() and mktime() from tzcode
instead of the C library is that we need to have thread safe code that can work
simultaneously with different timezones.  Normally this would require doing
putenv("TZ") all the time, which causes too much trouble for thread safety.
basically we want something like: struct tm *my_localtime(const time_t *time,
struct TZ * tz); - i.e., some sort of explicit timezone parameter.. same goes
for mktime.

I wonder if this is too far fetched.


On Fri 2001-02-09, Thomas Carey wrote:
> Srini - I have found it necessary to take exactly this approach, incorporating one "snapshot" of the TZ data into our product itself so that it would work properly everywhere. (our web application takes local time from the user's computer, but requires explicit (or implicit) selection of the timezone in effect for each entity to which a timezone applies.)
> 
> tc
>   ----- Original Message ----- 
>   From: Srinivas Nagaraj 
>   To: Time Zone Mailing List (E-mail) 
>   Sent: Friday, February 09, 2001 9:02 AM
>   Subject: TZ database content
> 
> 
>   The TZ (zoneinfo) database comes installed with several operating 
>   systems like Linux, Solaris, etc.  
>    
>   I have noticed the content of the TZ database varies between different 
>   versions of the same operating system and also between operating 
>   systems.  This could have been because of when a snapshot of the 
>   TZ database was taken.  
>    
>   Ofcourse, one significant difference is the actual name of the time zone.  
>   Depending on the content of the TZ database, the time zone name look 
>   different.  Is it because the TZ database has evolved?  
>    
>   I also noticed that the zone.tab file is not distributed on a number of 
>   installations.  Was that operating system installation decision?
>    
>   Now my main question, is it an appropriate application specific common 
>   practice to use an application specific TZ database?  That way the 
>   time zone names can be consistent, irrespective of where the application 
>   is installed?
>    
>   Thank you.
>    
>   Srini



More information about the tz mailing list