From 18671865037e74ae83262d9d177dd77b49449a15 Mon Sep 17 00:00:00 2001 From: ozinthecloud Date: Sun, 24 May 2015 21:21:30 +1000 Subject: [PATCH] fix bug in date formatting see http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_Patterns (this bug is rumored to have brought down Twitter last December) --- .../ACCodeSnippetRepositoryConfigurationWindowController.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ACCodeSnippetRepository/Controllers/ACCodeSnippetRepositoryConfigurationWindowController.m b/ACCodeSnippetRepository/Controllers/ACCodeSnippetRepositoryConfigurationWindowController.m index 104a5d1..3467dd5 100644 --- a/ACCodeSnippetRepository/Controllers/ACCodeSnippetRepositoryConfigurationWindowController.m +++ b/ACCodeSnippetRepository/Controllers/ACCodeSnippetRepositoryConfigurationWindowController.m @@ -270,7 +270,7 @@ - (NSString*)pathForSnippetDirectory { - (NSString*)pathForBackupDirectory { NSDate *currentDate = [NSDate date]; NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; - [dateFormatter setDateFormat:@"YYMMdd-HHmm"]; + [dateFormatter setDateFormat:@"yyMMdd-HHmm"]; return [NSString pathWithComponents:@[self.pathForSnippetDirectory, [NSString stringWithFormat:@"backup-%@", [dateFormatter stringFromDate:currentDate]]]]; }