summaryrefslogtreecommitdiffstats
path: root/mail/evolution/files/patch-widgets_e-timezone-dialog_e-timezone-dialog.c
blob: 9bccf3567a4ed80a9b0c64cadce5366b69b50fda (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
--- widgets/e-timezone-dialog/e-timezone-dialog.c.orig  2009-06-12 16:54:41.000000000 +0200
+++ widgets/e-timezone-dialog/e-timezone-dialog.c   2009-06-15 16:43:34.000000000 +0200
@@ -344,9 +344,20 @@ static icaltimezone*
 get_local_timezone(void)
 {
    icaltimezone *zone;
+   long offset;
+#ifdef __BSD_VISIBLE
+   time_t tt;
+   struct tm tm;
+#endif
 
    tzset();
-   zone =  icaltimezone_get_builtin_timezone_from_offset (-timezone, tzname[0]);
+#ifdef __BSD_VISIBLE
+   localtime_r (&tt, &tm);
+   offset = tm.tm_gmtoff;
+#else
+   offset = -timezone;
+#endif
+   zone =  icaltimezone_get_builtin_timezone_from_offset (offset, tzname[0]);
 
    return zone;
 }