fix: Set locale in date formatters, to solve parsing issues with 0-12 hours
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
{
|
||||
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
|
||||
formatter.timeZone = [NSTimeZone timeZoneWithName:@"Europe/Rome"];
|
||||
formatter.locale = [NSLocale localeWithLocaleIdentifier:@"en_US"];
|
||||
[formatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
|
||||
return [formatter dateFromString:dateString];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user