예제 #1
0
 def test_timestamp_with_year_over_9999(self):
     test_timestamp = '44841-05-05 22:07:58'.encode(encoding='utf-8',
                                                    errors='strict')
     parsed_timestamp = timestamp_parse(test_timestamp)
     # Assert year was truncated properly
     self.assertEqual(
         datetime(year=9999, month=5, day=5, hour=22, minute=7, second=58),
         parsed_timestamp)
예제 #2
0
 def test_timestamp_parser(self):
     test_timestamp = '1841-05-05 22:07:58'.encode(encoding='utf-8',
                                                   errors='strict')
     parsed_timestamp = timestamp_parse(test_timestamp)
     # Assert parser default to strptime
     self.assertEqual(
         datetime(year=1841, month=5, day=5, hour=22, minute=7, second=58),
         parsed_timestamp)
예제 #3
0
 def test_timestamp_with_year_over_9999_and_ms(self):
     parsed_timestamp = timestamp_parse('124841-05-05 22:07:58.000003')
     # Assert year was truncated properly
     self.assertEqual(
         datetime(year=4841,
                  month=5,
                  day=5,
                  hour=22,
                  minute=7,
                  second=58,
                  microsecond=3), parsed_timestamp)
예제 #4
0
 def test_timestamp_with_year_over_9999_and_ms(self):
     test_timestamp = '124841-05-05 22:07:58.000003'.encode(encoding='utf-8', errors='strict')
     parsed_timestamp = timestamp_parse(test_timestamp)
     # Assert year was truncated properly
     self.assertEqual(datetime(year=9999, month=5, day=5, hour=22, minute=7, second=58, microsecond=3), parsed_timestamp)
예제 #5
0
 def test_timestamp_parser(self):
     test_timestamp = '1841-05-05 22:07:58'.encode(encoding='utf-8', errors='strict')
     parsed_timestamp = timestamp_parse(test_timestamp)
     # Assert parser default to strptime
     self.assertEqual(datetime(year=1841, month=5, day=5, hour=22, minute=7, second=58), parsed_timestamp)
예제 #6
0
 def test_timestamp_with_year_over_9999_and_ms(self):
     parsed_timestamp = timestamp_parse('124841-05-05 22:07:58.000003')
     # Assert year was truncated properly
     self.assertEqual(datetime(year=4841, month=5, day=5, hour=22, minute=7, second=58, microsecond=3), parsed_timestamp)
예제 #7
0
 def test_timestamp_parser(self):
     parsed_timestamp = timestamp_parse('1841-05-05 22:07:58')
     # Assert parser default to strptime
     self.assertEqual(datetime(year=1841, month=5, day=5, hour=22, minute=7, second=58), parsed_timestamp)
예제 #8
0
 def test_timestamp_parser(self):
     parsed_timestamp = timestamp_parse('1841-05-05 22:07:58')
     # Assert parser default to strptime
     self.assertEqual(datetime(year=1841, month=5, day=5, hour=22, minute=7, second=58), parsed_timestamp)