[evolution/gnome-3-26] Bug 792343 - [CompEditor] Date-only value changed to DateTime on save



commit e694d4ae68c315f4c5d7dd9290f5c331f9cffceb
Author: Milan Crha <mcrha redhat com>
Date:   Wed Jan 10 10:52:29 2018 +0100

    Bug 792343 - [CompEditor] Date-only value changed to DateTime on save

 src/calendar/gui/e-comp-editor-property-part.c |   18 +++++++++---------
 1 files changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/src/calendar/gui/e-comp-editor-property-part.c b/src/calendar/gui/e-comp-editor-property-part.c
index 42298c2..07b7c5b 100644
--- a/src/calendar/gui/e-comp-editor-property-part.c
+++ b/src/calendar/gui/e-comp-editor-property-part.c
@@ -862,16 +862,16 @@ e_comp_editor_property_part_datetime_get_value (ECompEditorPropertyPartDatetime
        if (!e_date_edit_get_show_time (date_edit)) {
                value.is_date = 1;
        } else {
-               value.is_date = 0;
                value.zone = NULL;
-
-               e_date_edit_get_time_of_day (date_edit, &value.hour, &value.minute);
-
-               timezone_entry = g_weak_ref_get (&part_datetime->priv->timezone_entry);
-               if (timezone_entry)
-                       value.zone = e_timezone_entry_get_timezone (timezone_entry);
-               if (!value.zone)
-                       value.zone = icaltimezone_get_utc_timezone ();
+               value.is_date = !e_date_edit_get_time_of_day (date_edit, &value.hour, &value.minute);
+
+               if (!value.is_date) {
+                       timezone_entry = g_weak_ref_get (&part_datetime->priv->timezone_entry);
+                       if (timezone_entry)
+                               value.zone = e_timezone_entry_get_timezone (timezone_entry);
+                       if (!value.zone)
+                               value.zone = icaltimezone_get_utc_timezone ();
+               }
        }
 
        g_clear_object (&timezone_entry);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]