예제 #1
0
 def test_utc_offset(self):
     if time.localtime().tm_isdst:
         system_timezone = -time.altzone
     else:
         system_timezone = -time.timezone
     ok_(_utc_offset(datetime.datetime.now(), True) == system_timezone)
     ok_(not _utc_offset(datetime.datetime.now(), False))
예제 #2
0
 def test_utc_offset(self):
     if time.localtime().tm_isdst:
         system_timezone = -time.altzone
     else:
         system_timezone = -time.timezone
     ok_(_utc_offset(datetime.datetime.now(), True) == system_timezone)
     ok_(not _utc_offset(datetime.datetime.now(), False))
예제 #3
0
 def setUp(self):
     local_utcoffset = _utc_offset(datetime.datetime.now(), True)
     self.local_utcoffset = datetime.timedelta(seconds=local_utcoffset)
     self.local_timezone = _timezone(local_utcoffset)
예제 #4
0
 def setUp(self):
     local_utcoffset = _utc_offset(datetime.datetime.now(), True)
     self.local_utcoffset = datetime.timedelta(seconds=local_utcoffset)
     self.local_timezone = _timezone(local_utcoffset)