pendulum
pendulum copied to clipboard
from_format ignores tz paarametr end uses system timezone instead
-
[ x] I am on the latest Pendulum version.
-
[ x] I have searched the issues of this repo and believe that this is not a duplicate.
-
OS version and name: Ubuntu 22.04.3 LTS
-
Pendulum version: 2.1.2
Issue
from_format()
ignores tz parametr end uses system timezone instead.
import pendulum
pendulum.from_format('10-12-2022 00:00:00', 'DD-MM-YYYY HH:mm:ss')
# or
pendulum.from_format('10-12-2022 00:00:00', 'DD-MM-YYYY HH:mm:ss', tz='UTC')
Will drop an error pendulum.tz.zoneinfo.exceptions.InvalidTimezone: Invalid timezone "Europe/Kyiv"
Because
$ cat /etc/timezone
Europe/Kyiv
I would say the problem is not supporting the actual timezone name!