Tests/base/NSCalendar/era.m: Fix testing with non-English locale

Signed-off-by: Страхиња Радић <contact@strahinja.org>
This commit is contained in:
Страхиња Радић 2023-12-03 19:03:45 +01:00 committed by Hugo Melder
parent a0ce4ab880
commit ecc5d8008c

View file

@ -32,6 +32,8 @@ int main()
/* Test getEra:year:month:day:fromDate:
*/
dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setLocale: [[NSLocale alloc] initWithLocaleIdentifier:
[NSLocale canonicalLocaleIdentifierFromString: @"en_US"]]];
cal = [NSCalendar currentCalendar];
[cal setTimeZone:[NSTimeZone timeZoneWithName: @"America/New_York"]];
[dateFormatter setDateFormat: @"d MMM yyyy HH:mm:ss Z"];