Opened 3 years ago

Closed 19 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 2 years ago by djuengst

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

comment:2 Changed 2 years ago by djuengst

  • Cc djuengst added

comment:3 Changed 19 months ago by zach

  • Resolution set to Fixed
  • Status changed from new to closed

Add Comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.