Example #1
0
 def test_localize_datetime(self):
     dt = datetime.datetime(2010, 5, 3, 14, 54, 21, tzinfo=pytz.utc)
     naive_dt = datetime.datetime(2010, 5, 3, 15, 54, 21)
     local_dt = self.app.config['TIME_ZONE'].localize(naive_dt)
     self.assertEqual(filters.localize_datetime(dt), local_dt)
Example #2
0
 def test_localize_datetime(self):
     dt = datetime.datetime(2010, 5, 3, 14, 54, 21, tzinfo=pytz.utc)
     naive_dt = datetime.datetime(2010, 5, 3, 15, 54, 21)
     local_dt = self.app.config['TIME_ZONE'].localize(naive_dt)
     self.assertEqual(filters.localize_datetime(dt), local_dt)
Example #3
0
 def test_localize_datetime_with_naive_datetime(self):
     dt = datetime.datetime(2010, 5, 3, 14, 54, 21)
     self.assertEqual(filters.localize_datetime(dt), dt)
Example #4
0
 def test_localize_datetime_with_naive_datetime(self):
     dt = datetime.datetime(2010, 5, 3, 14, 54, 21)
     self.assertEqual(filters.localize_datetime(dt), dt)