From b670ff1169d82754763e932e1d19567008b1032d Mon Sep 17 00:00:00 2001 From: manuroe Date: Fri, 20 Oct 2017 15:51:10 +0200 Subject: [PATCH 1/2] Bug Report: Add local and UTC times to the report --- Riot/ViewController/BugReportViewController.m | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Riot/ViewController/BugReportViewController.m b/Riot/ViewController/BugReportViewController.m index f97c1d96d..92b773613 100644 --- a/Riot/ViewController/BugReportViewController.m +++ b/Riot/ViewController/BugReportViewController.m @@ -302,6 +302,15 @@ userInfo[@"default_app_language"] = [[NSBundle mainBundle] preferredLocalizations][0]; // The language chosen by the OS userInfo[@"app_language"] = [NSBundle mxk_language] ? [NSBundle mxk_language] : userInfo[@"default_app_language"]; // The language chosen by the user + NSDate *currentDate = [NSDate date]; + NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; + [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"]; + userInfo[@"local_time"] = [dateFormatter stringFromDate:currentDate]; + + [dateFormatter setTimeZone:[NSTimeZone timeZoneWithName:@"UTC"]]; + [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"]; + userInfo[@"utc_time"] = [dateFormatter stringFromDate:currentDate]; + bugReportRestClient.others = userInfo; // Screenshot From 7e4434e893342b68c3fde2ce56566937051299cc Mon Sep 17 00:00:00 2001 From: manuroe Date: Fri, 20 Oct 2017 15:54:31 +0200 Subject: [PATCH 2/2] Bug Report: Add local and UTC times to the report --- Riot/ViewController/BugReportViewController.m | 1 - 1 file changed, 1 deletion(-) diff --git a/Riot/ViewController/BugReportViewController.m b/Riot/ViewController/BugReportViewController.m index 92b773613..752483165 100644 --- a/Riot/ViewController/BugReportViewController.m +++ b/Riot/ViewController/BugReportViewController.m @@ -308,7 +308,6 @@ userInfo[@"local_time"] = [dateFormatter stringFromDate:currentDate]; [dateFormatter setTimeZone:[NSTimeZone timeZoneWithName:@"UTC"]]; - [dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"]; userInfo[@"utc_time"] = [dateFormatter stringFromDate:currentDate]; bugReportRestClient.others = userInfo;