summaryrefslogtreecommitdiff
path: root/iso8601/test_iso8601.py
diff options
context:
space:
mode:
Diffstat (limited to 'iso8601/test_iso8601.py')
-rw-r--r--iso8601/test_iso8601.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/iso8601/test_iso8601.py b/iso8601/test_iso8601.py
index 079663d..7a3c7a0 100644
--- a/iso8601/test_iso8601.py
+++ b/iso8601/test_iso8601.py
@@ -18,6 +18,14 @@ def test_parse_no_timezone_different_default():
assert d == datetime.datetime(2007, 1, 1, 8, 0, 0, 0, tz)
assert d.tzinfo == tz
+def test_parse_utc_different_default():
+ """Z should mean 'UTC', not 'default'.
+
+ """
+ tz = iso8601.FixedOffset(2, 0, "test offset")
+ d = iso8601.parse_date("2007-01-01T08:00:00Z", default_timezone=tz)
+ assert d == datetime.datetime(2007, 1, 1, 8, 0, 0, 0, iso8601.UTC)
+
@pytest.mark.parametrize("invalid_date", [
("2013-10-",),
("2013-",),