Skip to content

Commit

Permalink
fix(ios): use ISO08601 format for Date objects
Browse files Browse the repository at this point in the history
  • Loading branch information
Gary Mathews committed Aug 27, 2019
1 parent 79b2c41 commit 0dcb189
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
Binary file not shown.
2 changes: 1 addition & 1 deletion iphone/TitaniumKit/TitaniumKit/Sources/API/TiUtils.m
Original file line number Diff line number Diff line change
Expand Up @@ -2121,7 +2121,7 @@ + (id)stripInvalidJSONPayload:(id)jsonPayload
dateFormatter.locale = [NSLocale localeWithLocaleIdentifier:@"en_US_POSIX"];
dateFormatter.timeZone = [NSTimeZone timeZoneForSecondsFromGMT:0];
// ISO08601 formatting, same as Javascript stringified new Date()
dateFormatter.dateFormat = @"yyyy-MM-dd'T'HH:mm:ss.SSSZ";
dateFormatter.dateFormat = @"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'";

if ([jsonPayload isKindOfClass:[NSDictionary class]]) {
NSMutableDictionary *result = [NSMutableDictionary new];
Expand Down

0 comments on commit 0dcb189

Please sign in to comment.