diff options
author | Michael Twomey <michael.twomey@fieldaware.com> | 2013-10-17 18:28:35 +0100 |
---|---|---|
committer | Michael Twomey <michael.twomey@fieldaware.com> | 2013-10-17 18:28:35 +0100 |
commit | d51f5646e3867494c57cb6463535c0183662bebb (patch) | |
tree | 4f912278083d7e3640b598ceee839caeb1ca3eaf | |
parent | 2ebb90ea64858cf34d68ebdb915453e5325584a0 (diff) | |
download | pyiso8601-d51f5646e3867494c57cb6463535c0183662bebb.tar.gz |
Ensure parsing of timezones without separators works
Thanks to joe.walton.gglcd
Fixes #4
-rw-r--r-- | README.rst | 1 | ||||
-rw-r--r-- | iso8601/test_iso8601.py | 3 |
2 files changed, 3 insertions, 1 deletions
@@ -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 |