Beispiel #1
0
 def test_granular_now_rounding(self):
     d = datetime(2016, 1, 3, 1, 13)
     g = granular_now(d)
     self.assertEqual(d.hour, g.hour)
     self.assertEqual(10, g.minute)
Beispiel #2
0
 def test_granular_now_rounding(self):
     d = datetime(2016, 1, 3, 1, 13)
     g = granular_now(d)
     self.assertEqual(d.hour, g.hour)
     self.assertEqual(10, g.minute)
Beispiel #3
0
 def test_granular_now_dst_transition(self):
     # Should not raise an exception
     d = datetime(2016, 10, 30, 2, 10)
     tz = pytz.timezone('Europe/Copenhagen')
     granular_now(d, default_tz=tz)
Beispiel #4
0
 def test_granular_now_dst_transition(self):
     # Should not raise an exception
     d = datetime(2016, 10, 30, 2, 10)
     tz = pytz.timezone('Europe/Copenhagen')
     granular_now(d, default_tz=tz)