Opened 21 months ago
Closed 7 months ago
#2836 closed Defect (Fixed)
[patch] correct timezone issues with timestamps in Lion (10.7)
| Reported by: | magus424 | Owned by: | timothy |
|---|---|---|---|
| Component: | Colloquy (Mac) | Version: | 2.3 (Mac) |
| Severity: | Normal | Keywords: | |
| Cc: | djuengst |
Description
Lion seems to have changed the behavior of the time since 1970 to make it GMT, so the timestamps need to be adjusted by the current locale.
Trac won't let me log in, so dumping the patch here in case it won't let me attach a .patch later.
Fixes tickets #2821 #2819 #2813 #2812 #2809 #2801 #2800 #2797 #2775 #2771 #2770 #2767 #2766 #2763 #2761 #2760 #2759 #2738 #2737
Index: Additions/NSDateAdditions.m
===================================================================
--- Additions/NSDateAdditions.m (revision 5341)
+++ Additions/NSDateAdditions.m (working copy)
@@ -20,6 +20,8 @@
if (!dateFormatter) {
dateFormatter = [[NSDateFormatter alloc] init];
+ [dateFormatter setLocale:[NSLocale currentLocale]];
+ [dateFormatter setTimeZone:nil];
dateFormatter.dateStyle = dateStyle;
dateFormatter.timeStyle = timeStyle;
[dateFormatters addObject:dateFormatter];
Change History (3)
comment:1 Changed 16 months ago by djuengst
comment:2 Changed 16 months ago by djuengst
- Cc djuengst added
comment:3 Changed 7 months ago by zach
- Resolution set to Fixed
- Status changed from new to closed
Note: See
TracTickets for help on using
tickets.

Was this patch ever applied to the code? I've downloaded Colloquy 2.3 (4617) and the timezone problem is not fixed.