def test_local_now_with_tz_as_string(self): with mock.patch(u'django.utils.timezone.datetime', test_datetime(2014, 9, 10, 2, 20)): # in UTC value = local_now(u'America/Montreal') self._check_dt(value, u'2014-09-09 22:20:00.000000 EDT -0400')
def test_local_now(self): with mock.patch(u'django.utils.timezone.datetime', test_datetime(2014, 9, 10, 2, 20)): # in UTC value = local_now() self._check_dt(value, u'2014-09-10 04:20:00.000000 CEST +0200')