FS#68150 - [tzdata] Incorrect time displayed in i3 with tzdata version 2020b-1
Attached to Project:
Arch Linux
Opened by Zachary Jordan (zacjor) - Thursday, 08 October 2020, 01:12 GMT
Last edited by Andreas Radke (AndyRTR) - Monday, 21 June 2021, 19:38 GMT
Opened by Zachary Jordan (zacjor) - Thursday, 08 October 2020, 01:12 GMT
Last edited by Andreas Radke (AndyRTR) - Monday, 21 June 2021, 19:38 GMT
|
Details
Description:
Using the tzdata version 2020b-1 gives me the incorrect time in i3/i3pystatus. timedatectl reported all the correct times, but I was being shown UTC instead of local time through i3. Downgrading tzdata to 2020a-1 fixed the issue. |
This task depends upon
Closed by Andreas Radke (AndyRTR)
Monday, 21 June 2021, 19:38 GMT
Reason for closing: Fixed
Additional comments about closing: Please ask to reopen or file a new issue once we can drop zic fat support.
Monday, 21 June 2021, 19:38 GMT
Reason for closing: Fixed
Additional comments about closing: Please ask to reopen or file a new issue once we can drop zic fat support.
If not, it could very well be in i3pystatus, which is not supported.
from pytz import timezone
from datetime import datetime
berlin = timezone('Europe/Berlin')
print(berlin.utcoffset(datetime(2020,10,1)))
should print "2:00:00" with tzdata 2020a, but prints "0:00:00" after the update to tzdata 2020b. This affects e.g. the "clock" module in py3status and probably everything else using python-pytz as well.
Other software using time zone information appears to be unaffected, e.g. the "date" command.
https://github.com/stub42/pytz/commit/d6a6878c0a4637d859f488bf4a76d51092d8cb36
Now that python 3.9 has the stdlib zoneinfo module (available all the way back to 3.6 via backports.zoneinfo) which does support slim files, hopefully pytz will stop being used and projects will migrate to the stdlib.
There is currently discussion about the possibility that pytz might wrap its own API around backports.zoneinfo to gain support for slim files and transparently support the system timezone files even. That would be the ideal scenario.
For the future please someone who's following may open a new report to undo that revert once we have python-pytz working with python 3.9 timezone reading or start some todo list
to keep pushing various projects if more are affected.