regebro / tzlocal

A Python module that tries to figure out what your local timezone is
MIT License
184 stars 58 forks source link

AzurePipelines not working for linux or windows #87

Closed timkpaine closed 3 years ago

timkpaine commented 4 years ago

Running on Azure pipelines, I get the following error running get_localzone:

tz = <StaticTzInfo 'Etc/UTC'>

    def get_tz_offset(tz):
        """Get timezone's offset using built-in function datetime.utcoffset()."""
>       return int(datetime.datetime.now(tz).utcoffset().total_seconds())
E       AttributeError: 'NoneType' object has no attribute 'total_seconds'
regebro commented 4 years ago

None? Weird...

timkpaine commented 4 years ago

let me know whatever other info might be helpful, here are the logs (should be public): https://dev.azure.com/tpaine154/pyEX/_build/results?buildId=447&view=logs&j=936136b6-c495-56a6-9e3e-988b38df8fb3&t=a5d5bb20-0db0-56c2-52b2-9c5d6dccb8d3&l=468

timkpaine commented 4 years ago

interestingly it fails with the same error on windows and linux but not mac

regebro commented 3 years ago

I think this is a bug with Azure pipelines. Does it still happen?

timkpaine commented 3 years ago

@regebro ive been moving over to github actions, feel free to close and I'll ping to reopen if I see it again