On 14/02/2026 12:24, Victor Churchill wrote:

I'm not and have never been a Python coder but my understanding of the datetime strings you are seeing is that they give you
yyyy-mm-dd hh:mm:ss[delta]

where [delta] is the difference between the requested local time zone and GMT expressed as [+-]hh:mm

Hope that helps?

Well almost :-)

Since we are already in GMT, then we don't need that string?  We simply say:

  from datetime import datetime, timedelta
  from zoneinfo import ZoneInfo

  x = datetime(2022, 10, 31, 18, 30, tzinfo=ZoneInfo("Europe/London"))

--
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]

Reply via email to