diff options
author | Brad Leege <bleege@gmail.com> | 2015-04-06 17:50:02 -0500 |
---|---|---|
committer | Brad Leege <bleege@gmail.com> | 2015-04-06 17:50:02 -0500 |
commit | 67ce07cadaecfc47cb766abcf7eb858950d91d12 (patch) | |
tree | 612063c183a5357f93ad5780f582d89be5721ed7 /platform | |
parent | 17ded82d87ae46e788378e746acf4603c3647d12 (diff) | |
download | qtlocation-mapboxgl-67ce07cadaecfc47cb766abcf7eb858950d91d12.tar.gz |
#1217 - Changing date formatter to use device's system timezone and to give both timezone abbreviation as well as hour offset
Diffstat (limited to 'platform')
-rw-r--r-- | platform/ios/MGLMapboxEvents.m | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/platform/ios/MGLMapboxEvents.m b/platform/ios/MGLMapboxEvents.m index c9c125dee1..bd9fc9165b 100644 --- a/platform/ios/MGLMapboxEvents.m +++ b/platform/ios/MGLMapboxEvents.m @@ -164,8 +164,9 @@ NSString *const MGLEventGestureRotateStart = @"Rotation"; NSLocale *enUSPOSIXLocale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"]; [_rfc3339DateFormatter setLocale:enUSPOSIXLocale]; - [_rfc3339DateFormatter setDateFormat:@"yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'"]; - [_rfc3339DateFormatter setTimeZone:[NSTimeZone timeZoneForSecondsFromGMT:0]]; + [_rfc3339DateFormatter setDateFormat:@"yyyy'-'MM'-'dd'T'HH':'mm':'ss z Z"]; + [NSTimeZone resetSystemTimeZone]; + [_rfc3339DateFormatter setTimeZone:[NSTimeZone systemTimeZone]]; } return self; } |