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

tzlocal error on Debian 12 #1130

Open
RogerSelwyn opened this issue Feb 19, 2025 · 3 comments
Open

tzlocal error on Debian 12 #1130

RogerSelwyn opened this issue Feb 19, 2025 · 3 comments

Comments

@RogerSelwyn
Copy link
Contributor

I've started getting this error showing on my Debian environment (which is the default for Home Assistant)

[tzlocal] /etc/timezone is deprecated on Debian, and no longer reliable. Ignoring.

I believe this is cause by the call to get_localzone in connection.py. Is there a way to get the local zone another way?

@alejcas
Copy link
Member

alejcas commented Feb 19, 2025

Seems something that tzlocal is aware of. Check notes on 5.3:

https://github.com/regebro/tzlocal/blob/master/CHANGES.txt

On O365 it’s easy to provide your own time zone. Maybe you just can do that.

@RogerSelwyn
Copy link
Contributor Author

I do provide my own time zone (though I’ll check that), I think it just always gets local time zone.

I’ll look tomorrow

@RogerSelwyn
Copy link
Contributor Author

I’ll raise a PR on connection.py tomorrow, code alerts users tzlocal when it doesn’t need to if timezone is supplied.

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

2 participants