Skip to content

Commit 0543464

Browse files
committed
Avoid deprecated date NSDateFormatter method
1 parent d40cefe commit 0543464

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Classes/git/PBGitCommit.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,9 @@ - (NSDate *) date
4848

4949
- (NSString *) dateString
5050
{
51-
NSDateFormatter* formatter = [[NSDateFormatter alloc] initWithDateFormat:@"%Y-%m-%d %H:%M:%S" allowNaturalLanguage:NO];
52-
return [formatter stringFromDate: self.date];
51+
NSDateFormatter * formatter = [[NSDateFormatter alloc] init];
52+
[formatter setLocalizedDateFormatFromTemplate:@"%Y-%m-%d %H:%M:%S"];
53+
return [formatter stringFromDate:self.date];
5354
}
5455

5556
- (NSArray*) treeContents

0 commit comments

Comments
 (0)