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

[Bug]: UnknownTimezoneWarning: tzname BST identified but not understood #296

Closed
davidgdlt opened this issue Oct 25, 2024 · 4 comments · Fixed by #298 or #301
Closed

[Bug]: UnknownTimezoneWarning: tzname BST identified but not understood #296

davidgdlt opened this issue Oct 25, 2024 · 4 comments · Fixed by #298 or #301
Labels
bug Something isn't working

Comments

@davidgdlt
Copy link

What happened?

From the HA logs (several occurrences):

custom_components/opnsense/pyopnsense/init.py:449
WARNING (MainThread) [py.warnings] /usr/local/lib/python3.12/site-packages/dateutil/parser/_parser.py:1207: UnknownTimezoneWarning: tzna
warnings.warn("tzname {tzname} identified but not understood.

My time zone is set to GMT +00:00 in the BUI.

hass-opnsense Version

0.3.7

OPNsense Firmware

24.7.7

Home Assistant Version

2024.10.3

Relevant logs

No response

Additional Details

No response

@davidgdlt davidgdlt added the bug Something isn't working label Oct 25, 2024
@Snuffy2
Copy link
Collaborator

Snuffy2 commented Oct 26, 2024

Ok, I'll have to handle when it can't find the time zone. To clarify, it is detecting you are in the BST timezone? For my education is that British Summer Time? And what is BUI?

@davidgdlt
Copy link
Author

Apologies for the late reply. It was detecting I was in British Summer Time as that's what was set in Home Assistant's Browser User Interface. The abuse of acronysms is just professional deformation :)
Thanks for looking into it!

@davidgdlt
Copy link
Author

I just updated to 0.3.8-beta.3 and I'm still seeing the warnings in the log:

Register: py.warnings
Source: custom_components/opnsense/pyopnsense/init.py:466
2024-10-26 15:49:00.913 WARNING (MainThread) [py.warnings] /usr/local/lib/python3.12/site-packages/dateutil/parser/_parser.py:1207: UnknownTimezoneWarning: tzname BST identified but not understood. Pass tzinfos argument in order to correctly return a timezone-aware datetime. In a future version, this will raise an exception.
warnings.warn("tzname {tzname} identified but not understood. "

To set the time zone to BST: In the Home Assistant interface, menu Settings / System / General / Time zone = (GMT +00:00) London

@Snuffy2
Copy link
Collaborator

Snuffy2 commented Oct 26, 2024

Ok, I corrected all of the other calls that used timezone to use UTC Offset instead. However, I missed the one that was actually causing the warning in the first place. This is getting the timezone abbreviation from OPNsense from when it last checked for a firmware update. I'll get that handled too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants