[Bug 1995864] Re: UnknownTimeZoneError: 'Europe/Kyiv' in python3-tz

James Henstridge 1995864 at bugs.launchpad.net
Wed Nov 9 08:14:54 UTC 2022


Long term, it is probably best to move off of pytz. If you're okay to
require Python >= 3.9 (released October 2020), then just use the built-
in zoneinfo package.

    import pytz          => import zoneinfo
    pytz.timezone("foo") => zoneinfo.ZoneInfo("foo")
    pytz.all_timezones   => zoneinfo.available_timezones()

There are a few differences in how the two libraries treat repeated
dates at daylight saving transitions: pytz tried to solve the problem
back when there was ambiguity in the datetime module. The zoneinfo
module was designed after they fixed the ambiguity and works a little
differently. Chances are things will just work though.

The zoneinfo package does not rely on a hard coded list of time zones,
so does not require updates when tzdata changes.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to python-tz in Ubuntu.
https://bugs.launchpad.net/bugs/1995864

Title:
  UnknownTimeZoneError: 'Europe/Kyiv' in python3-tz

Status in python-tz package in Ubuntu:
  Confirmed

Bug description:
  I install latest updates on my Ubuntu 20.04 and 22.04 and timezone has changed from Europe/Kiev to Europe/Kyiv, which caused error in my service:
  pytz.exceptions.UnknownTimeZoneError: 'Europe/Kyiv'

  The problem exists on:
  Ubuntu 20.04 python3-tz version - 2019.3-1
  Ubuntu 22.04 with version of python3-tz - 2022.1-1.
  The problem is solved for kinetic release. Could you please add 'Europe/Kyiv' timezone for previous releases.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-tz/+bug/1995864/+subscriptions




More information about the foundations-bugs mailing list