Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 1269

Python • Re: Why does datetime.fromisoformat fail on rpi, but works on windows?

$
0
0
Probably due to the python version in use. It works fine on a pi5 running Bookworm

Code:

pi@pi5-4GB:~ $ pythonPython 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0] on linuxType "help", "copyright", "credits" or "license" for more information.>>> from datetime import datetime>>> xx = datetime.fromisoformat('2023-11-18T22:47:10Z')>>> print(xx)2023-11-18 22:47:10+00:00

Statistics: Posted by neilgl — Wed Jan 03, 2024 3:28 pm



Viewing all articles
Browse latest Browse all 1269

Trending Articles