diff --git a/src/gcal-utils.c b/src/gcal-utils.c index 1491da55..6c8ec17e 100644 --- a/src/gcal-utils.c +++ b/src/gcal-utils.c @@ -22,6 +22,7 @@ #include "gcal-event-widget.h" #include "gcal-view.h" +#include #include #include @@ -278,6 +279,19 @@ gcal_compare_event_widget_by_date (gconstpointer a, return icaltime_compare (*a_date, *b_date); } +void print_date (const gchar* prefix, + const icaltimetype* icaltime) +{ + gchar* temp = + isodate_from_time_t (icaltime_as_timet_with_zone (*icaltime, + icaltime->zone)); + g_debug ("%s: %s -- zone: %s", + prefix, + temp, + icaltimezone_get_display_name (icaltime->zone)); + g_free (temp); +} + /* Function to do a last minute fixup of the AM/PM stuff if the locale * and gettext haven't done it right. Most English speaking countries * except the USA use the 24 hour clock (UK, Australia etc). However diff --git a/src/gcal-utils.h b/src/gcal-utils.h index 598f5aad..b546151f 100644 --- a/src/gcal-utils.h +++ b/src/gcal-utils.h @@ -73,6 +73,9 @@ GdkPixbuf* gcal_get_pixbuf_from_color (GdkColor gint gcal_compare_event_widget_by_date (gconstpointer a, gconstpointer b); +void print_date (const gchar* prefix, + const icaltimetype* icaltime); + /* code brought from evolution */ gsize e_strftime_fix_am_pm (gchar *str, gsize max,