Example #1
0
 def test_now_roundtrip(self):
     str = utils.isotime()
     now = utils.parse_isotime(str)
     self.assertEquals(now.tzinfo, iso8601.iso8601.UTC)
     self.assertEquals(utils.isotime(now), str)
Example #2
0
 def test_east_roundtrip(self):
     str = '2012-02-14T20:53:07-07:00'
     east = utils.parse_isotime(str)
     self.assertEquals(east.tzinfo.tzname(None), '-07:00')
     self.assertEquals(utils.isotime(east), str)
Example #3
0
 def test_west_roundtrip(self):
     str = '2012-02-14T20:53:07+11:30'
     west = utils.parse_isotime(str)
     self.assertEquals(west.tzinfo.tzname(None), '+11:30')
     self.assertEquals(utils.isotime(west), str)
Example #4
0
 def test_zulu_roundtrip(self):
     str = '2012-02-14T20:53:07Z'
     zulu = utils.parse_isotime(str)
     self.assertEquals(zulu.tzinfo, iso8601.iso8601.UTC)
     self.assertEquals(utils.isotime(zulu), str)