From b0182d3c5669cbfa3a4cf02cea0b386641108302 Mon Sep 17 00:00:00 2001 From: CaS Date: Tue, 1 Apr 2003 11:20:41 +0000 Subject: [PATCH] Tiny simplification git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@16313 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 5 +++++ Source/NSCalendarDate.m | 13 +++---------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1d4aa48b5..0519fac3e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-04-01 Richard Frith-Macdonald + + * Source/NSCalendarDate.m: trivial simplification of timezone + handling. + 2003-03-31 Stephane Corthesy * Source/Additions/GCArray.m: Replace retain/release by diff --git a/Source/NSCalendarDate.m b/Source/NSCalendarDate.m index f18ac094f..67da33db6 100644 --- a/Source/NSCalendarDate.m +++ b/Source/NSCalendarDate.m @@ -589,7 +589,7 @@ static inline int getDigits(const char *from, char *to, int limit) { int year = 0, month = 1, day = 1; int hour = 0, min = 0, sec = 0; - NSTimeZone *tz = localTZ; + NSTimeZone *tz = nil; BOOL ampm = NO; BOOL twelveHrClock = NO; int julianWeeks = -1, weekStartsMonday = 0, dayOfWeek = -1; @@ -1045,11 +1045,8 @@ static inline int getDigits(const char *from, char *to, int limit) sourceIdx += getDigits(&source[sourceIdx], tmpStr, 4); zone = atoi(tmpStr) * sign; - if ((tz = [NSTimeZone timeZoneForSecondsFromGMT: - (zone / 100 * 60 + (zone % 100)) * 60]) == nil) - { - tz = localTZ; - } + tz = [NSTimeZone timeZoneForSecondsFromGMT: + (zone / 100 * 60 + (zone % 100)) * 60]; } break; @@ -1076,10 +1073,6 @@ static inline int getDigits(const char *from, char *to, int limit) { tz = [NSTimeZone timeZoneWithAbbreviation: z]; } - if (tz == nil) - { - tz = localTZ; - } } break;