RFC [PATCH] BZ#1077902: New API gettimezone

P J P pj.pandit@yahoo.co.in
Fri Apr 4 09:49:00 GMT 2014


> On Friday, 4 April 2014 12:09 PM, Paul Eggert wrote:
> If you consider this to be a problem, then I suggest campaigning to 
> change this practice, so that TZ is set by default.

  No, I don't consider that to be a problem. Because one '/etc/localtime' is always accessible to regular(non-chroot) applications and second every system does not have to run programs inside chroot(2) jail. So that campaign is a non-solution.

> That is much simpler than trying to convince library developers to add a new API with 
> hard-to-explain semantics,

  If you think that is simpler, feel free to start your campaign for setting TZ variable. About hard-to-explain semantics, which part of gettimezone(or tzget) is hard-to-explain?

> and then to convince application developers to use it.

  There is no need for that. They'll use it if and when they need it. Point is, an API should exist for when they need it.

> There should be no need to add a complicated API

  Which part of gettimezone(or tzget) is complicated?

> to work around an operational problem that is easily addressed
> by configuring systems correctly in the first place.

  It's not an operational problem. These default settings are done by distributions, of which there are millions of them. It would be a long shot to expect them all to set TZ variable by default.

  Instead, having a standard portable API to query local time-zone database is certainly a better solution. As Carlos said, it's an API deficiency to have tzset() without tzget().

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



More information about the Libc-help mailing list