def test_iso_format(self):
    'Test conversion from and to ISO format.'
    sep = 'T'
    t1 = Timestamp.utcnow()
    if (not t1.microsecond):
        t1 = t1.replace(microsecond=1)
    ts1 = t1.isoformat()
    t2 = Timestamp.fromISOformat(ts1)
    ts2 = t2.isoformat()
    self.assertNotEqual(t1, t2)
    t1 = t1.replace(microsecond=0)
    self.assertEqual(t1, t2)
    self.assertEqual(ts1, ts2)
    (date, sep, time) = ts1.partition(sep)
    time = time.rstrip('Z')
    self.assertEqual(date, str(t1.date()))
    self.assertEqual(time, str(t1.time()))
Test conversion from and to ISO format.
def test_iso_format(self):
    
    sep = 'T'
    t1 = Timestamp.utcnow()
    if (not t1.microsecond):
        t1 = t1.replace(microsecond=1)
    ts1 = t1.isoformat()
    t2 = Timestamp.fromISOformat(ts1)
    ts2 = t2.isoformat()
    self.assertNotEqual(t1, t2)
    t1 = t1.replace(microsecond=0)
    self.assertEqual(t1, t2)
    self.assertEqual(ts1, ts2)
    (date, sep, time) = ts1.partition(sep)
    time = time.rstrip('Z')
    self.assertEqual(date, str(t1.date()))
    self.assertEqual(time, str(t1.time()))