mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-07-31 07:30:40 +00:00
Format date and timestamp of crash reports to be always identical no matter what locale is set
This commit is contained in:
parent
aa05de04a1
commit
4dbbef38e2
@ -240,8 +240,14 @@ static NSInteger binaryImageSort(id binary1, id binary2, void *context) {
|
||||
NSString *osBuild = @"???";
|
||||
if (report.systemInfo.operatingSystemBuild != nil)
|
||||
osBuild = report.systemInfo.operatingSystemBuild;
|
||||
|
||||
[text appendFormat: @"Date/Time: %@\n", report.systemInfo.timestamp];
|
||||
|
||||
NSLocale *enUSPOSIXLocale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"];
|
||||
NSDateFormatter *rfc3339Formatter = [[NSDateFormatter alloc] init];
|
||||
[rfc3339Formatter setLocale:enUSPOSIXLocale];
|
||||
[rfc3339Formatter setDateFormat:@"yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'"];
|
||||
[rfc3339Formatter setTimeZone:[NSTimeZone timeZoneForSecondsFromGMT:0]];
|
||||
|
||||
[text appendFormat: @"Date/Time: %@\n", [rfc3339Formatter stringFromDate:report.systemInfo.timestamp]];
|
||||
[text appendFormat: @"OS Version: %@ %@ (%@)\n", osName, report.systemInfo.operatingSystemVersion, osBuild];
|
||||
[text appendFormat: @"Report Version: 104\n"];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user