summaryrefslogtreecommitdiff
path: root/mail/evolution/patches/patch-aa
blob: fe039ffa01b6fd3d575f7e7f027e7d1a9007bf43 (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.25 2008/04/15 18:42:53 drochner Exp $

--- ./widgets/e-timezone-dialog/e-timezone-dialog.c.orig	2008-02-25 04:47:39.000000000 +0100
+++ ./widgets/e-timezone-dialog/e-timezone-dialog.c
@@ -84,8 +84,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);
@@ -336,7 +334,6 @@ e_timezone_dialog_construct (ETimezoneDi
 	return NULL;
 }
 
-#if 0
 static int
 get_local_offset (void)
 {
@@ -349,10 +346,11 @@ get_local_offset (void)
 	t_gmt = mktime (&gmt);
 	t_local = mktime (&local);
 	diff = t_local - t_gmt;
+	if (local.tm_isdst == 1)
+		diff += 3600;
 
 	return diff;
 }
-#endif
 
 static icaltimezone*
 get_local_timezone(void)
@@ -360,7 +358,7 @@ get_local_timezone(void)
 	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;
 }