aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-09-26 18:42:47 +0800
committerMilan Crha <mcrha@redhat.com>2011-09-26 18:42:47 +0800
commit10d9a80d698479d8c96f0ba46a64a9fb5521edff (patch)
treeb90ac34ffdbb2c3e61c2cba27be53ab6ae9f2e63 /modules
parent23f5359c41e50c189425ab043162e0b6e0ccda80 (diff)
downloadgsoc2013-evolution-10d9a80d698479d8c96f0ba46a64a9fb5521edff.tar
gsoc2013-evolution-10d9a80d698479d8c96f0ba46a64a9fb5521edff.tar.gz
gsoc2013-evolution-10d9a80d698479d8c96f0ba46a64a9fb5521edff.tar.bz2
gsoc2013-evolution-10d9a80d698479d8c96f0ba46a64a9fb5521edff.tar.lz
gsoc2013-evolution-10d9a80d698479d8c96f0ba46a64a9fb5521edff.tar.xz
gsoc2013-evolution-10d9a80d698479d8c96f0ba46a64a9fb5521edff.tar.zst
gsoc2013-evolution-10d9a80d698479d8c96f0ba46a64a9fb5521edff.zip
Bug #659568 - One day delay in calendar view
Diffstat (limited to 'modules')
-rw-r--r--modules/calendar/e-cal-shell-view.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/modules/calendar/e-cal-shell-view.c b/modules/calendar/e-cal-shell-view.c
index 61a2d9c27a..0a9b7701f8 100644
--- a/modules/calendar/e-cal-shell-view.c
+++ b/modules/calendar/e-cal-shell-view.c
@@ -70,6 +70,7 @@ cal_shell_view_execute_search (EShellView *shell_view)
ECalModel *model;
GtkRadioAction *action;
icaltimezone *timezone;
+ const gchar *default_tzloc = NULL;
struct icaltimetype current_time;
time_t start_range;
time_t end_range;
@@ -95,6 +96,11 @@ cal_shell_view_execute_search (EShellView *shell_view)
current_time = icaltime_current_time_with_zone (timezone);
now_time = time_day_begin (icaltime_as_timet (current_time));
+ if (timezone && timezone != icaltimezone_get_utc_timezone ())
+ default_tzloc = icaltimezone_get_location (timezone);
+ if (!default_tzloc)
+ default_tzloc = "";
+
action = GTK_RADIO_ACTION (ACTION (CALENDAR_SEARCH_ANY_FIELD_CONTAINS));
value = gtk_radio_action_get_current_value (action);
@@ -165,9 +171,8 @@ cal_shell_view_execute_search (EShellView *shell_view)
end = isodate_from_time_t (end_range);
temp = g_strdup_printf (
- "(and %s (occur-in-time-range? "
- "(make-time \"%s\") (make-time \"%s\")))",
- query, start, end);
+ "(and %s (occur-in-time-range? (make-time \"%s\") (make-time \"%s\") \"%s\"))",
+ query, start, end, default_tzloc);
g_free (query);
query = temp;
@@ -181,9 +186,8 @@ cal_shell_view_execute_search (EShellView *shell_view)
end = isodate_from_time_t (end_range);
temp = g_strdup_printf (
- "(and %s (occur-in-time-range? "
- "(make-time \"%s\") (make-time \"%s\")))",
- query, start, end);
+ "(and %s (occur-in-time-range? (make-time \"%s\") (make-time \"%s\") \"%s\"))",
+ query, start, end, default_tzloc);
g_free (query);
query = temp;