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
Crash when reading timezone for generating alert #2659
Labels
Milestone
Comments
Hi @nicolargo on your system can you enter (and copy/paste the result) of the following command:
Thanks ! |
Here you go! >>> import time
>>> time.tzname
('PST', 'PDT')
>>> import pytz
>>> pytz.timezone(tzname[0])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.11/site-packages/pytz/__init__.py", line 177, in timezone
raise UnknownTimeZoneError(zone)
pytz.exceptions.UnknownTimeZoneError: 'PST' Some other information: >>> print(' '.join(pytz.country_timezones['us']))
America/New_York America/Detroit America/Kentucky/Louisville America/Kentucky/Monticello America/Indiana/Indianapolis America/Indiana/Vincennes America/Indiana/Winamac America/Indiana/Marengo America/Indiana/Petersburg America/Indiana/Vevay America/Chicago America/Indiana/Tell_City America/Indiana/Knox America/Menominee America/North_Dakota/Center America/North_Dakota/New_Salem America/North_Dakota/Beulah America/Denver America/Boise America/Phoenix America/Los_Angeles America/Anchorage America/Juneau America/Sitka America/Metlakatla America/Yakutat America/Nome America/Adak Pacific/Honolulu
>>> 'PST' in pytz.all_timezones
False I don't really see how this code is expected to work, after reading the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Program throws a traceback and exits when attempting to generate a timestamp for an an event alert.
To Reproduce
Steps to reproduce the behavior:
glances-git
AUR package, set the timezone toAmerica/Los_Angeles
withtimedatectl
stress
to consume >80% CPUExpected behavior
Timezone is properly read to format the timestamp for the event alert.
Environment (please complete the following information)
glances-git
(3.4.0.r351.g36ed96b-1
) from AURAdditional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: