Fix use of Z as a timezone (meaning UTC).
[libdcp.git] / src / local_time.cc
index 46718a756b7d89615ada90d154127b14f92772c8..f125b38f6cb12011cc8cd48926f8ab943e924fa6 100644 (file)
@@ -165,7 +165,7 @@ LocalTime::LocalTime (string s)
        }
 
        /* Timezone */
-       if (pos != s.length()) {
+       if (pos != s.length() && s[pos] != 'Z') {
                if (s[pos] != '+' && s[pos] != '-') {
                        throw TimeFormatError(s);
                }
@@ -180,9 +180,6 @@ LocalTime::LocalTime (string s)
                        _offset.set_hour(-_offset.hour());
                        _offset.set_minute(-_offset.minute());
                }
-       } else {
-               _offset.set_hour(0);
-               _offset.set_minute(0);
        }
 }