Example #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()
Example #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()
Example #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))
Example #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))