Skip to content
This repository was archived by the owner on Oct 8, 2024. It is now read-only.

Commit

Permalink
Fix: Added date format internationalization (#33)
Browse files Browse the repository at this point in the history
Co-authored-by: adrien <[email protected]>
  • Loading branch information
AVuillaume and adrien authored Oct 20, 2020
1 parent 47c734b commit 4e732e2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ios/ListLibraryItems.m
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ - (void)uploadItem:(CDVInvokedUrlCommand *)command {
[headers setObject:[self getMimeTypeFromPath:resource.originalFilename] forKey:@"Content-Type"];
// Adding creation date of asset to headers
NSDateFormatter * df = [[NSDateFormatter alloc] init];
NSLocale * locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US"];
[df setLocale:locale];
[df setTimeZone:[NSTimeZone timeZoneWithAbbreviation:@"GMT"]];
[df setDateFormat:@"EEE',' dd MMM yyyy HH':'mm':'ss 'GMT'"];
[request setValue:[df stringFromDate:[asset creationDate]] forHTTPHeaderField:@"Date"];
Expand Down

0 comments on commit 4e732e2

Please sign in to comment.