mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-07-30 23:20:28 +00:00
Fix date handling to correctly use UTC date time format
This commit is contained in:
parent
d884936029
commit
8e7c08b4db
@ -41,9 +41,11 @@
|
|||||||
_barStyle = UIBarStyleDefault;
|
_barStyle = UIBarStyleDefault;
|
||||||
_modalPresentationStyle = UIModalPresentationFormSheet;
|
_modalPresentationStyle = UIModalPresentationFormSheet;
|
||||||
|
|
||||||
|
NSLocale *enUSPOSIXLocale = [[[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"] autorelease];
|
||||||
_rfc3339Formatter = [[NSDateFormatter alloc] init];
|
_rfc3339Formatter = [[NSDateFormatter alloc] init];
|
||||||
[_rfc3339Formatter setLocale:[[[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"] autorelease]];
|
[_rfc3339Formatter setLocale:enUSPOSIXLocale];
|
||||||
[_rfc3339Formatter setDateFormat:@"yyyy-MM-dd'T'HH:mm:ss'Z'"];
|
[_rfc3339Formatter setDateFormat:@"yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'"];
|
||||||
|
[_rfc3339Formatter setTimeZone:[NSTimeZone timeZoneForSecondsFromGMT:0]];
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user