-
-
Notifications
You must be signed in to change notification settings - Fork 117
Open
Description
I found strange outputs. I suspect that this is due DST because the DST shift will be in 2025-10-26.
from zoneinfo import ZoneInfo
from datetime import datetime
prague = ZoneInfo(key='Europe/Prague')
now = datetime(year=2025, month=10, day=19, hour=12, minute=0, second=0, tzinfo=prague)
c = croniter("10 3 * * 0", now)
c.get_prev(datetime)
>>> Out[34]: datetime.datetime(2025, 10, 19, 3, 10, tzinfo=zoneinfo.ZoneInfo(key='Europe/Prague'))
c.get_next(datetime)
>>> Out[35]: datetime.datetime(2025, 10, 26, 4, 10, tzinfo=zoneinfo.ZoneInfo(key='Europe/Prague'))
# Here I would expect 2025-10-19 as interval is 1 week, not 1 hour
c.get_prev(datetime)
>>> Out[36]: datetime.datetime(2025, 10, 26, 3, 10, tzinfo=zoneinfo.ZoneInfo(key='Europe/Prague'))
griquelme and Safrone
Metadata
Metadata
Assignees
Labels
No labels