From 32d1175b502474891768c9c3bec34ae24c9a450f Mon Sep 17 00:00:00 2001 From: drochner Date: Sat, 1 Dec 2007 18:14:02 +0000 Subject: If evolution is started to display the calendar of a day clicked on in the clock applet, convert the day's start time to UTC first. evolution does only accept UTC times, and since midnight at Greenwich is still the previous day in the US, evolution did show the previous day for US users. See https://bugs.launchpad.net/evolution/+bug/42115 for a discussion. Ubuntu does simply add 12h which works in most cases, but not always in pacific areas. We do it correctly. The Ubuntu fix was proposed by walt per mail to tech-pkg; thanks walt for testing my patch too. --- x11/gnome-panel/distinfo | 3 ++- x11/gnome-panel/patches/patch-aa | 31 +++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 x11/gnome-panel/patches/patch-aa (limited to 'x11') diff --git a/x11/gnome-panel/distinfo b/x11/gnome-panel/distinfo index ae8566160f6..e021e90ffdd 100644 --- a/x11/gnome-panel/distinfo +++ b/x11/gnome-panel/distinfo @@ -1,5 +1,6 @@ -$NetBSD: distinfo,v 1.37 2007/11/29 20:44:31 drochner Exp $ +$NetBSD: distinfo,v 1.38 2007/12/01 18:14:02 drochner Exp $ SHA1 (gnome-panel-2.20.2.tar.bz2) = d3bf83e825afc47e620129f63b0fd00229ef12a7 RMD160 (gnome-panel-2.20.2.tar.bz2) = e883139c8c873290e7d854c1a45642ff0d34c2a8 Size (gnome-panel-2.20.2.tar.bz2) = 2835817 bytes +SHA1 (patch-aa) = 602ceea87d5861aa1400268e1a1e189c7281ddac diff --git a/x11/gnome-panel/patches/patch-aa b/x11/gnome-panel/patches/patch-aa new file mode 100644 index 00000000000..eef5a42a43f --- /dev/null +++ b/x11/gnome-panel/patches/patch-aa @@ -0,0 +1,31 @@ +$NetBSD: patch-aa,v 1.5 2007/12/01 18:14:02 drochner Exp $ + +--- applets/clock/calendar-window.c.orig 2007-11-27 01:02:56.000000000 +0100 ++++ applets/clock/calendar-window.c +@@ -1098,12 +1098,23 @@ calendar_day_activated (GtkCalendar * + unsigned int day; + unsigned int month; + unsigned int year; ++ struct tm date; ++ time_t daystart; + char *argument; + + gtk_calendar_get_date (calendar, &year, &month, &day); +- +- argument = g_strdup_printf ("calendar:///?startdate=%.4d%.2d%.2d", +- year, month + 1, day); ++ bzero(&date, sizeof(date)); ++ date.tm_mday = day; ++ date.tm_mon = month; ++ date.tm_year = year - 1900; ++ date.tm_isdst = -1; ++ daystart = mktime(&date); ++ gmtime_r(&daystart, &date); ++ ++ argument = g_strdup_printf ( ++ "calendar:///?startdate=%.4d%.2d%.2dT%.2d%.2d%.2d", ++ date.tm_year + 1900, date.tm_mon + 1, date.tm_mday, ++ date.tm_hour, date.tm_min, date.tm_sec); + + clock_launch_evolution (calwin, argument); + -- cgit v1.2.3