calenderspec: when normalizing, flush out UTC timezone
authorLennart Poettering <lennart@poettering.net>
Sat, 30 Dec 2017 13:07:33 +0000 (14:07 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 4 Jan 2018 12:27:27 +0000 (13:27 +0100)
src/basic/calendarspec.c

index 41dceb0..d1ba168 100644 (file)
@@ -156,6 +156,11 @@ static void fix_year(CalendarComponent *c) {
 int calendar_spec_normalize(CalendarSpec *c) {
         assert(c);
 
+        if (streq_ptr(c->timezone, "UTC")) {
+                c->utc = true;
+                c->timezone = mfree(c->timezone);
+        }
+
         if (c->weekdays_bits <= 0 || c->weekdays_bits >= BITS_WEEKDAYS)
                 c->weekdays_bits = -1;