Hi,

this is a patch for displaying commit timestamp in the format a user has selected in System Preferences:


diff --git a/PBGitCommit.m b/PBGitCommit.m
index b883c95..bb24be9 100644
--- a/PBGitCommit.m
+++ b/PBGitCommit.m
@@ -36,7 +36,10 @@ - (NSDate *)date

- (NSString *) dateString
{
- NSDateFormatter* formatter = [[NSDateFormatter alloc] initWithDateFormat:@"%Y-%m-%d %H:%M:%S" allowNaturalLanguage:NO];
+    NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
+    [formatter setLocale: [NSLocale currentLocale]];
+    [formatter setDateStyle:kCFDateFormatterMediumStyle];
+    [formatter setTimeStyle:kCFDateFormatterMediumStyle];
        return [formatter stringFromDate: self.date];
}


Greets, Bernd


Development on 7zz
[email protected]




Reply via email to