예제 #1
0
 def test_repr(self):
     tz = utils.create_timezone(1234)
     self.assertEqual("Timezone +2034", repr(tz))
예제 #2
0
 def test_dst(self):
     tz = utils.create_timezone(1234)
     offset = tz.dst(datetime.datetime.now())
     self.assertEqual(datetime.timedelta(0), offset)
예제 #3
0
 def test_name(self):
     tz = utils.create_timezone(1234)
     name = tz.tzname(datetime.datetime.now())
     self.assertIsNone(name)
예제 #4
0
 def test_utcoffset(self):
     tz = utils.create_timezone(1234)
     offset = tz.utcoffset(datetime.datetime.now())
     self.assertEqual(datetime.timedelta(minutes=1234), offset)
예제 #5
0
 def test_repr(self):
     tz = utils.create_timezone(1234)
     self.assertEqual("Timezone +2034", repr(tz))
예제 #6
0
 def test_name(self):
     tz = utils.create_timezone(1234)
     name = tz.tzname(datetime.datetime.now())
     self.assertIsNone(name)
예제 #7
0
 def test_dst(self):
     tz = utils.create_timezone(1234)
     offset = tz.dst(datetime.datetime.now())
     self.assertEqual(datetime.timedelta(0), offset)
예제 #8
0
 def test_utcoffset(self):
     tz = utils.create_timezone(1234)
     offset = tz.utcoffset(datetime.datetime.now())
     self.assertEqual(datetime.timedelta(minutes=1234), offset)