Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix time setting for daylight savings, let Python do the work
Since the port from pytz to zoneinfo in rhinstaller#3167, anaconda has set the system clock one hour too fast when installing for a timezone that does daylight savings time, during daylight savings time. There turns out to be a lot of history behind this calculation, see https://bugzilla.redhat.com/show_bug.cgi?id=1965718#c4 for details. It turns out that since Python 3.3, datetime objects have the `timestamp()` method, which does exactly what we want here. In my tests it gives the correct answer in every problematic case, including the one I found was broken in current code, and the Kolkata and Aden timezones mentioned in https://bugzilla.redhat.com/show_bug.cgi?id=1293314 . So I think we should just use that. Resolves: rhbz#1965718
- Loading branch information