Esempio n. 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()
Esempio n. 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()
Esempio n. 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))
Esempio n. 4
0
 def testTzwinLocalUTCOffset(self):
     with TZWinContext('Eastern Standard Time'):
         tzwl = tzwin.tzwinlocal()
         self.assertEqual(datetime(2014, 3, 11, tzinfo=tzwl).utcoffset(),
                          timedelta(hours=-4))