Skip to content

Commit

Permalink
Tests/base/NSCalendar/era.m: Fix testing with non-English locale
Browse files Browse the repository at this point in the history
Signed-off-by: Страхиња Радић <contact@strahinja.org>
  • Loading branch information
Strahinja authored and hmelder committed Jan 14, 2024
1 parent a0ce4ab commit ecc5d80
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Tests/base/NSCalendar/era.m
Original file line number Diff line number Diff line change
Expand Up @@ -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"];
Expand Down

0 comments on commit ecc5d80

Please sign in to comment.