- modify the timezone patch; from NetBSD
fixes the timezone selection GUI "commit it" jasper@
This commit is contained in:
parent
81f7d24623
commit
9dc6e56516
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: Makefile,v 1.57 2009/01/31 08:32:35 jasper Exp $
|
||||
# $OpenBSD: Makefile,v 1.58 2009/02/03 15:54:24 ajacoutot Exp $
|
||||
|
||||
COMMENT= integrated email and PIM software for GNOME
|
||||
|
||||
@ -6,6 +6,7 @@ COMMENT= integrated email and PIM software for GNOME
|
||||
# in mail/evolution-plugin-rss/Makefile (and bump).
|
||||
GNOME_PROJECT= evolution
|
||||
GNOME_VERSION= 2.24.4
|
||||
PKGNAME= ${DISTNAME}p0
|
||||
|
||||
CATEGORIES= mail
|
||||
|
||||
|
@ -1,37 +1,42 @@
|
||||
$OpenBSD: patch-widgets_e-timezone-dialog_e-timezone-dialog_c,v 1.5 2008/11/21 17:28:07 jasper Exp $
|
||||
$OpenBSD: patch-widgets_e-timezone-dialog_e-timezone-dialog_c,v 1.6 2009/02/03 15:54:24 ajacoutot Exp $
|
||||
--- widgets/e-timezone-dialog/e-timezone-dialog.c.orig Mon Oct 13 10:43:29 2008
|
||||
+++ widgets/e-timezone-dialog/e-timezone-dialog.c Thu Nov 13 20:19:22 2008
|
||||
@@ -77,7 +77,9 @@ struct _ETimezoneDialogPrivate {
|
||||
+++ widgets/e-timezone-dialog/e-timezone-dialog.c Tue Feb 3 13:41:13 2009
|
||||
@@ -77,8 +77,6 @@ struct _ETimezoneDialogPrivate {
|
||||
|
||||
#ifndef G_OS_WIN32 /* Declared properly in time.h already */
|
||||
extern char *tzname[2];
|
||||
+#ifndef __BSD_VISIBLE
|
||||
extern long timezone;
|
||||
+#endif /* __BSD_VISIBLE */
|
||||
extern int daylight;
|
||||
-extern long timezone;
|
||||
-extern int daylight;
|
||||
#endif
|
||||
|
||||
@@ -351,9 +353,22 @@ static icaltimezone*
|
||||
get_local_timezone(void)
|
||||
{
|
||||
icaltimezone *zone;
|
||||
+ long offset;
|
||||
static void e_timezone_dialog_class_init (ETimezoneDialogClass *class);
|
||||
@@ -329,7 +327,6 @@ e_timezone_dialog_construct (ETimezoneDialog *etd)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
-#if 0
|
||||
static int
|
||||
get_local_offset (void)
|
||||
{
|
||||
@@ -342,10 +339,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)
|
||||
@@ -353,7 +351,7 @@ get_local_timezone(void)
|
||||
icaltimezone *zone;
|
||||
|
||||
+#ifdef __BSD_VISIBLE
|
||||
+ time_t tt;
|
||||
+ struct tm tm;
|
||||
+#endif /* __BSD_VISIBLE */
|
||||
+
|
||||
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 /* __BSD_VISIBLE */
|
||||
+ zone = icaltimezone_get_builtin_timezone_from_offset (offset, tzname[0]);
|
||||
+ zone = icaltimezone_get_builtin_timezone_from_offset (-get_local_offset(), tzname[0]);
|
||||
|
||||
return zone;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user