gcal-edit-dialog: Use event timezone if available
Changing the time of an event with a different timezone was automatically changing the timezone to the local one. This patch checks whether a timezone is already set and uses that. Fixes #273
This commit is contained in:
committed by
Georges Basile Stavracas Neto
parent
8e017ada21
commit
ac879dd8ec
+11
-1
@@ -1467,7 +1467,17 @@ return_datetime_for_widgets (GcalEditDialog *dialog,
|
||||
|
||||
/* Use UTC timezone for All Day events, otherwise use the event's timezone */
|
||||
all_day = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->all_day_check));
|
||||
tz = all_day ? g_time_zone_new_utc () : g_time_zone_new_local ();
|
||||
if (all_day)
|
||||
{
|
||||
tz = g_time_zone_new_utc ();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (gcal_event_get_timezone (dialog->event))
|
||||
tz = g_time_zone_ref (gcal_event_get_timezone (dialog->event));
|
||||
else
|
||||
tz = g_time_zone_new_local ();
|
||||
}
|
||||
|
||||
date = gcal_date_selector_get_date (date_selector);
|
||||
time = gcal_time_selector_get_time (time_selector);
|
||||
|
||||
Reference in New Issue
Block a user