summaryrefslogtreecommitdiff
path: root/mail/evolution/patches/patch-aa
blob: 8e69c3828a058a361871763ffe8b5692ec42eef9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
$NetBSD: patch-aa,v 1.24 2007/11/03 21:55:00 drochner Exp $

--- ./widgets/e-timezone-dialog/e-timezone-dialog.c.orig	2007-10-12 09:03:43.000000000 +0200
+++ ./widgets/e-timezone-dialog/e-timezone-dialog.c
@@ -82,8 +82,6 @@ struct _ETimezoneDialogPrivate {
 
 #ifndef G_OS_WIN32 /* Declared properly in time.h already */
 extern char *tzname[2];
-extern long timezone;
-extern int daylight;
 #endif
 
 static void e_timezone_dialog_class_init	(ETimezoneDialogClass *class);
@@ -304,7 +302,6 @@ e_timezone_dialog_construct (ETimezoneDi
 	return NULL;
 }
 
-#if 0
 static int
 get_local_offset ()
 {
@@ -317,10 +314,11 @@ get_local_offset ()
 	t_gmt = mktime (&gmt);
 	t_local = mktime (&local);
 	diff = t_local - t_gmt;
+	if (local.tm_isdst == 1)
+		diff += 3600;
 
 	return diff;
 }
-#endif
 
 static const icaltimezone*
 get_local_timezone()
@@ -328,7 +326,7 @@ get_local_timezone()
 	icaltimezone *zone;
 	
 	tzset();
-	zone =  icaltimezone_get_builtin_timezone_from_offset (-timezone, tzname[0]);
+	zone =  icaltimezone_get_builtin_timezone_from_offset (-get_local_offset(), tzname[0]);
 
 	return zone;
 }