Fixed: Check the abbreviation from the correct place in the test

This commit is contained in:
Martin Carlberg committed 2015-09-30 18:15:32 +02:00
1 parent 5871c4f092
commit 1b0d053ab9
1 file changed
+1 -1
+1 -1
View File
@@ -1143,7 +1143,7 @@
// As the CPTimeZone does not care about daylight saving time. The 'PT' time zone can result in 'PST' or 'PDT'.
// The assert below can be any of the two version depending which time zone abbreviation CPDictionary 'keyEnumerator'
// will return first. This behaviour is undefined.
if ([[_dateFormatter timeZone] abbreviation] === @"PDT")
if ([[CPTimeZone _timeZoneFromString:@"PT" style:CPTimeZoneNameStyleShortGeneric locale:[_dateFormatter locale]] abbreviation] === @"PDT")
[self assert:result equals:[[CPDate alloc] initWithString:@"2000-01-01 09:00:00 +0000"]];
else
[self assert:result equals:[[CPDate alloc] initWithString:@"2000-01-01 10:00:00 +0000"]];