Skip to content

Use of tzset #329

Jul 14, 2021 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

@BrainDeadYoloBot

Is it really necessary to use tzset() from time?

Yes... See #270

It used only once in a code

No, tzset() is run in the DrawClock() method that is run at least every second, and it's guarded by an if statement that makes sure it runs once every hour.

bpytop/bpytop.py

Lines 1708 to 1710 in 900557e

if cls.c_counter > 3600 / (Config.update_ms / 1000):
tzset()
cls.c_counter = 0

The thing is that tzset has limited availability. For example it is not present on ODROID HC-4 running CoreELEC (linux based distro of KODI). With the use of tzset the installation fails.

time.tzset() is part of the standard python3 library see https://docs.python.org/…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@BrainDeadYoloBot
Comment options

@aristocratos
Comment options

Answer selected by aristocratos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants