From 4e732e26428ed69c73a129282a1fc0b3a9546588 Mon Sep 17 00:00:00 2001 From: AVuillaume <56958025+AVuillaume@users.noreply.github.com> Date: Tue, 20 Oct 2020 11:21:39 +0200 Subject: [PATCH] Fix: Added date format internationalization (#33) Co-authored-by: adrien --- src/ios/ListLibraryItems.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ios/ListLibraryItems.m b/src/ios/ListLibraryItems.m index dadf100..89420d5 100755 --- a/src/ios/ListLibraryItems.m +++ b/src/ios/ListLibraryItems.m @@ -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"];