Commits

Michael Twomey committed 4b0ae15

Ensure parsing of timezones without separators works

Thanks to joe.walton.gglcd

Fixes #4

  • Participants
  • Parent commits 65f8264

Comments (0)

Files changed (2)

 * 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
 -----

iso8601/test_iso8601.py

     ("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)
     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
+    pickle.dumps(parsed)  # ensure it pickles