Support the OpenSuse key TIMEZONE in /etc/sysconfig/clock.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33512 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2011-07-11 09:35:54 +00:00
parent f9f1f879f4
commit 9c39943894
2 changed files with 12 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2011-07-11 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSTimeZone.m (+systemTimeZone): Support the OpenSuse key
TIMEZONE in /etc/sysconfig/clock.
2011-07-10 Wolfgang Lux <wolfgang.lux@gmail.com>
* Source/NSObject.m (+zone): Override to ensure that -zone returns

View file

@ -1527,9 +1527,14 @@ static NSMapTable *absolutes = 0;
while (nil != (s = [e nextObject]))
{
s = [s stringByTrimmingSpaces];
if ([s hasPrefix: @"ZONE"])
// OpenSuse uses the non-standard key TIMEZONE
if ([s hasPrefix: @"ZONE"] || [s hasPrefix: @"TIMEZONE"])
{
s = [s substringFromIndex: 4];
if ([s hasPrefix: @"ZONE"])
s = [s substringFromIndex: 4];
else
s = [s substringFromIndex: 8];
s = [s stringByTrimmingSpaces];
if ([s hasPrefix: @"="])
{