예제 #1
0
    def testLocal(self):
        # Not sure how to pin a local time zone, so for now we're just going
        # to run this and make sure it doesn't raise an error
        # See Github Issue #135: https://github.com/dateutil/dateutil/issues/135
        datetime.now(tzwin.tzwinlocal())

        datetime(2014, 3, 11, tzinfo=tzwin.tzwinlocal()).utcoffset()
예제 #2
0
    def testLocal(self):
        # Not sure how to pin a local time zone, so for now we're just going
        # to run this and make sure it doesn't raise an error
        # See Github Issue #135: https://github.com/dateutil/dateutil/issues/135
        datetime.now(tzwin.tzwinlocal())

        datetime(2014, 3, 11, tzinfo=tzwin.tzwinlocal()).utcoffset()
예제 #3
0
 def testTzwinLocalUTCOffset(self):
     with TZWinContext('Eastern Standard Time'):
         tzwl = tzwin.tzwinlocal()
         self.assertEqual(
             datetime(2014, 3, 11, tzinfo=tzwl).utcoffset(),
             timedelta(hours=-4))
예제 #4
0
파일: test_tz.py 프로젝트: d0f/dateutil
 def testTzwinLocalUTCOffset(self):
     with TZWinContext('Eastern Standard Time'):
         tzwl = tzwin.tzwinlocal()
         self.assertEqual(datetime(2014, 3, 11, tzinfo=tzwl).utcoffset(),
                          timedelta(hours=-4))