[gnome-calendar/ui-rewrite] manager: use timezone info in time_t conversion
- From: Erick Pérez Castellanos <erickpc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/ui-rewrite] manager: use timezone info in time_t conversion
- Date: Sat, 27 Sep 2014 12:51:45 +0000 (UTC)
commit e39c2effd1254f90cb647ed652befed10b8173d1
Author: Erick Pérez Castellanos <erick red gmail com>
Date: Fri Sep 26 12:51:40 2014 -0400
manager: use timezone info in time_t conversion
src/gcal-manager.c | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/src/gcal-manager.c b/src/gcal-manager.c
index e96961c..191e3b5 100644
--- a/src/gcal-manager.c
+++ b/src/gcal-manager.c
@@ -264,18 +264,22 @@ gcal_manager_init (GcalManager *self)
G_CALLBACK (gcal_manager_on_sources_row_changed),
self);
+ priv->system_timezone = e_cal_util_get_system_timezone ();
+
priv->initial_date = g_new(icaltimetype, 1);
- *(priv->initial_date) = icaltime_from_timet (time (NULL), 0);
+ *(priv->initial_date) = icaltime_from_timet_with_zone (time (NULL),
+ 0,
+ priv->system_timezone);
priv->final_date = g_new(icaltimetype, 1);
- *(priv->final_date) = icaltime_from_timet (time (NULL), 0);
+ *(priv->final_date) = icaltime_from_timet_with_zone (time (NULL),
+ 0,
+ priv->system_timezone);
priv->clients = g_hash_table_new_full (g_str_hash,
g_str_equal,
g_free,
gcal_manager_free_unit_data);
-
- priv->system_timezone = e_cal_util_get_system_timezone ();
}
static void
@@ -1237,10 +1241,12 @@ gcal_manager_set_new_range (GcalManager *manager,
{
/* rebuild query */
gchar* since_iso8601 =
- isodate_from_time_t (icaltime_as_timet (*(priv->initial_date)));
+ isodate_from_time_t (icaltime_as_timet_with_zone (*(priv->initial_date),
+ priv->system_timezone));
gchar* until_iso8601 =
- isodate_from_time_t (icaltime_as_timet (*(priv->final_date)));
+ isodate_from_time_t (icaltime_as_timet_with_zone (*(priv->final_date),
+ priv->system_timezone));
if (priv->query != NULL)
g_free (priv->query);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]