bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #33455] Time zone issue on Linux systems running in the UK


From: Richard Frith-Macdonald
Subject: [bug #33455] Time zone issue on Linux systems running in the UK
Date: Wed, 01 Jun 2011 15:43:02 +0000
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_7; en-us) AppleWebKit/533.21.1 (KHTML, like Gecko) Version/5.0.5 Safari/533.21.1

Follow-up Comment #4, bug #33455 (project gnustep):

> So the question is what means properly installed.
> I know I can set 'Local Time Zone' in NSGlobalDefaults
> or even set up a file somewhere deep in the gnustep-base
> library's resources (which I'd like to refrain from doing,
> since that file has to be recreated whenever -base is updated to a new
version),

Yes, if you install by building from source the HOWTo's/documentation tell you
to set the default/env variable, and if you install from a package, the
packager should have done that for you.

> but I'd prefer not having to perform such additional post installation
steps. 

Me too ... but nobody's come up with a reliable way to do it :-(

> NSTimeZone uses the information provided by tzset. In particular, this is 
> tzname[0] = "GMT" 
> tzname[1] = "BST" 
> timezone = 0 
> daylight = 1 

Unfortunately tzset doesn't tell you what time zone the system uses, unless
'daylight=0', in which case tzname[0] should hold the zone name (though even
then it could be an ambiguous abbreviation).

I suppose it would be possible to enumerate the list of available timezones,
and look for one whose standard and daylight times match tzname[0] and
tzname[1] and use the first match found ... I don't know if that would be
completely reliable (there could be timezones which use the same pair of
offsets but different dates for changing between them for instance), but it
would be a better guess than at present.  However, it could be *slow* as we
might have to load in the data files for all the time zones.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?33455>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]