This is the mail archive of the libc-help@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: RFC [PATCH] BZ#1077902: New API gettimezone


> On Friday, 4 April 2014 12:20 PM, Paul Eggert wrote:
> but the simple solution is to not rely on /etc/localtime, and to always 
> set TZ.

 It does not make sense to ask users to set TZ variable when they want to run applications inside chroot(2).

> Not "will fix".ÂÂ*Has* fixed.ÂÂIt's what people have been doing 
> forÂ*decades*, and it *works*.

 For _your_ definition of it works. IMO, if users have to maintain workaround tools to convert UTC to their local timezone, it does not work. As I mentioned earlier, UTC is an easy-to-implement solution, but difficult for users who have to read time and then adjust it to their local time zone.

Say, you go to an airport and all flight times are in UTC. How would you like to convert those to your local time-zone and figure out what time is your flight? And what are the chances of errors when _all_ passengers & their relatives have to do that??


> People who want to run non-UTC servers (which is a bad idea) can set TZ. 
> Problem solved.

 Not the _best_ solution.

> Something like that *might* be implemented.ÂÂBut doing it right would be 
> a lot of work for a small benefit.

 Could you please elaborate on this lot of work part?

> in the time zone API, such as, why isn't there a thread-safe way to set 
> and get the time zone?

 Currently there is no way to get the time zone. :(

> If you want to work on improving this area ofÂglibc,
> please work on *that*.ÂÂThat's a *real* need, and there'sÂexisting practice(NetBSD).

Since we are using BSD references, from tzset(3) manual,

Â"...4.3BSD  had a function char *timezone(zone, dst) that returned the name
       of the timezone corresponding to its first argument  (minutes  West  of
       UTC).  If the second argument was 0, the standard name was used, otherâ
       wise the daylight saving time version.Â"

That sounds much like gettimezone or tzget.
---
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]