blob: d619a2d09734747193b3c99fc8d83fc9d3dca236 (
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
|
diff --exclude-from=/home/dang/.scripts/diffrc -up -ruN evolution-2.21.3.orig/widgets/e-timezone-dialog/e-timezone-dialog.c evolution-2.21.3/widgets/e-timezone-dialog/e-timezone-dialog.c
--- evolution-2.21.3.orig/widgets/e-timezone-dialog/e-timezone-dialog.c 2007-11-29 23:24:05.000000000 -0500
+++ evolution-2.21.3/widgets/e-timezone-dialog/e-timezone-dialog.c 2007-12-04 15:33:32.000000000 -0500
@@ -82,7 +82,9 @@ struct _ETimezoneDialogPrivate {
#ifndef G_OS_WIN32 /* Declared properly in time.h already */
extern char *tzname[2];
+#ifndef __BSD_VISIBLE
extern long timezone;
+#endif
extern int daylight;
#endif
@@ -326,9 +328,20 @@ static icaltimezone*
get_local_timezone(void)
{
icaltimezone *zone;
-
- tzset();
- zone = icaltimezone_get_builtin_timezone_from_offset (-timezone, tzname[0]);
+ long offset;
+#ifdef __BSD_VISIBLE
+ time_t tt;
+ struct tm tm;
+#endif
+
+ tzset();
+#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;
}
|