'Test conversion from iso compatible date strings to struct_time'

def test_from_json(self):

    self.compare_dates(DateTest.date.from_json('2013-01-01'), DateTest.date.from_json('2012-12-31'), datetime.timedelta(days=1))
    self.compare_dates(DateTest.date.from_json('2013-01-01T00'), DateTest.date.from_json('2012-12-31T23'), datetime.timedelta(hours=1))
    self.compare_dates(DateTest.date.from_json('2013-01-01T00:00'), DateTest.date.from_json('2012-12-31T23:59'), datetime.timedelta(minutes=1))
    self.compare_dates(DateTest.date.from_json('2013-01-01T00:00:00'), DateTest.date.from_json('2012-12-31T23:59:59'), datetime.timedelta(seconds=1))
    self.compare_dates(DateTest.date.from_json('2013-01-01T00:00:00Z'), DateTest.date.from_json('2012-12-31T23:59:59Z'), datetime.timedelta(seconds=1))
    self.compare_dates(DateTest.date.from_json('2012-12-31T23:00:01-01:00'), DateTest.date.from_json('2013-01-01T00:00:00+01:00'), datetime.timedelta(hours=1, seconds=1))
