Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

latest versions of tzlocal leads to 0xC004F074 error #140

Open
kinotenn opened this issue Aug 23, 2021 · 2 comments
Open

latest versions of tzlocal leads to 0xC004F074 error #140

kinotenn opened this issue Aug 23, 2021 · 2 comments

Comments

@kinotenn
Copy link

kinotenn commented Aug 23, 2021

The latest versions of tzlocal such as 3.0, will lead to a 0xC004F074 error while activating, as with these versions, tzlocal.get_localzone() losts its localize() method.

Effected PY file: pykms_Base.py
Row: 127
Original script:

tz = get_localzone()
local_dt = tz.localize(requestDatetime)

Solution:

tz = get_localzone()
from datetime import datetime
local_dt = datetime.fromtimestamp(requestDatetime.timestamp(), tz=tz)

Or to specify the version of tzlocal to 2.x.

@muhammetunal
Copy link

muhammetunal commented Sep 6, 2021

I apply your solution for this error but it doesn't solve my problem for windows server 2022 standard

@brunofatia
Copy link

I had the same issue, your fix worked for me.

Server = Raspberry Pi (Debian)
Python3 and dependencies last updated today with apt.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants