From d51f5646e3867494c57cb6463535c0183662bebb Mon Sep 17 00:00:00 2001 From: Michael Twomey Date: Thu, 17 Oct 2013 18:28:35 +0100 Subject: Ensure parsing of timezones without separators works Thanks to joe.walton.gglcd Fixes #4 --- README.rst | 1 + iso8601/test_iso8601.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 284ab9f..6da8b2d 100644 --- a/README.rst +++ b/README.rst @@ -73,6 +73,7 @@ Changes * Support more variations of ISO 8601 dates, times and time zone specs. * Fix microsecond rounding issues (https://bitbucket.org/micktwomey/pyiso8601/issue/2/roundoff-issues-when-parsing-decimal) (thanks to nielsenb@jetfuse.net) * Fix pickling and deepcopy of returned datetime objects (https://bitbucket.org/micktwomey/pyiso8601/issue/3/dates-returned-by-parse_date-do-not) (thanks to fogathmann and john@openlearning.com) +* Fix timezone offsets without a separator (https://bitbucket.org/micktwomey/pyiso8601/issue/4/support-offsets-without-a-separator) (thanks to joe.walton.gglcd) 0.1.4 ----- diff --git a/iso8601/test_iso8601.py b/iso8601/test_iso8601.py index a696038..079663d 100644 --- a/iso8601/test_iso8601.py +++ b/iso8601/test_iso8601.py @@ -49,6 +49,7 @@ def test_parse_invalid_date(invalid_date): ("2013-10-15T18Z", datetime.datetime(2013, 10, 15, 18, 0, 0, 0, iso8601.UTC)), # hh ("20131015T18:30Z", datetime.datetime(2013, 10, 15, 18, 30, 0, 0, iso8601.UTC)), # YYYYMMDD ("2012-12-19T23:21:28.512400+00:00", datetime.datetime(2012, 12, 19, 23, 21, 28, 512400, iso8601.FixedOffset(0, 0, "+00:00"))), # https://code.google.com/p/pyiso8601/issues/detail?id=21 + ("2006-10-20T15:34:56.123+0230", datetime.datetime(2006, 10, 20, 15, 34, 56, 123000, iso8601.FixedOffset(2, 30, "+02:30"))), # https://code.google.com/p/pyiso8601/issues/detail?id=18 ]) def test_parse_valid_date(valid_date, expected_datetime): parsed = iso8601.parse_date(valid_date) @@ -63,4 +64,4 @@ def test_parse_valid_date(valid_date, expected_datetime): assert parsed == expected_datetime assert parsed.isoformat() == expected_datetime.isoformat() copy.deepcopy(parsed) # ensure it's deep copy-able - pickle.dumps(parsed) # ensure it pickles \ No newline at end of file + pickle.dumps(parsed) # ensure it pickles -- cgit v1.2.1