Hi,
The problem I alluded to earlier was related to timezone data in
apscheduler. An error is thrown up saying:
/home/pi/.local/lib/site-packages/apscheduler/triggers/interval.py:66:
PytzUsageWarning: The normalise method is no longer necessary, as this
time zone supports the fold attribute (PEP495). For more details on
migrating to a PEP 495-compliant implementation see
https://pytz-deprecation-shim.readthedocs.io/en/latest/migration.html.
I thought that upgrading apscheduler to the latest version might fix
that, but it didn't. I'm having some trouble interpreting the
information on that site, so can anyone help?
We are only using Python 3, so I'm assuming that all I need to do is
modify the relevant lines of code in my program to match:
import zoneinfo
from datetime import datetime
NYC = zoneinfo.ZoneInfo("America/New_York")
datetime(2020, 1, 1, tzinfo=NYC)
However, we already have:
from zoneinfo import ZoneInfo
from datetime import datetime, timedelta, timezone
So do I need to add the line below that block in the example to suit the
UK (eg the NYC bit)? I'm not sure that I understand what that code
block is saying.
--
Terry Coles
--
Next meeting: Online, Jitsi, Tuesday, 2026-03-03 20:00
Check to whom you are replying
Meetings, mailing list, IRC, ... https://dorset.lug.org.uk
New thread, don't hijack: mailto:[email protected]