python-pause
python-pause copied to clipboard
Daylight savings is not cooperating
I do not have a solution, but I would like to kindly point out a flaw that I came across: This library does NOT support daylight savings time adjustment for me: My setup is on Linux Mint 21
import os
import pause
from datetime import datetime
# make sure pause is installed
os.system('pip install pause')
# disable NTP otherwise time wont change
os.system('timedatectl set-ntp 0')
# set timezone to test
os.system('timedatectl set-timezone "America/Chicago"')
# change time to right before daylight savings time clock rolls over
os.system('sudo date --set="20230312 01:59:55"')
# actual fail point
print('pause module SHOULD run in less than 10 seconds')
pause.until(datetime(2023, 3, 12, 3, 0, 2)) # note that daylight savings shift
print('finished') # <<< does NOT run in less than 10 seconds....