# timezone to use when rendering the date within the migration file
# as well as the filename.
-# If specified, requires the python>=3.9 or backports.zoneinfo library.
+# If specified, requires the python>=3.9 or backports.zoneinfo library and tzdata library.
# Any required deps can installed by adding `alembic[tz]` to the pip requirements
# string value is passed to ZoneInfo()
# leave blank for localtime
# timezone to use when rendering the date within the migration file
# as well as the filename.
-# If specified, requires the python>=3.9 or backports.zoneinfo library.
+# If specified, requires the python>=3.9 or backports.zoneinfo library and tzdata library.
# Any required deps can installed by adding `alembic[tz]` to the pip requirements
# string value is passed to ZoneInfo()
# leave blank for localtime
# timezone to use when rendering the date within the migration file
# as well as the filename.
-# If specified, requires the python>=3.9 or backports.zoneinfo library.
+# If specified, requires the python>=3.9 or backports.zoneinfo library and tzdata library.
# Any required deps can installed by adding `alembic[tz]` to the pip requirements
# string value is passed to ZoneInfo()
# leave blank for localtime
# timezone to use when rendering the date within the migration file
# as well as the filename.
- # If specified, requires the python>=3.9 or backports.zoneinfo library.
+ # If specified, requires the python>=3.9 or backports.zoneinfo library and tzdata library.
# Any required deps can installed by adding `alembic[tz]` to the pip requirements
# string value is passed to ZoneInfo()
# leave blank for localtime
* ``timezone`` - an optional timezone name (e.g. ``UTC``, ``EST5EDT``, etc.)
that will be applied to the timestamp which renders inside the migration
file's comment as well as within the filename. This option requires Python>=3.9
- or installing the ``backports.zoneinfo`` library. If ``timezone`` is specified,
- the create date object is no longer derived from ``datetime.datetime.now()``
- and is instead generated as::
+ or installing the ``backports.zoneinfo`` library and the ``tzdata`` library.
+ If ``timezone`` is specified, the create date object is no longer derived
+ from ``datetime.datetime.now()`` and is instead generated as::
datetime.datetime.utcnow().replace(
tzinfo=datetime.timezone.utc
--- /dev/null
+.. change::
+ :tags: bug, environment
+ :tickets: 1556
+
+ Added `tzdata` to `tz` extras, which is required on some platforms such as
+ Windows. Pull request courtesy Danipulok.
[options.extras_require]
tz =
backports.zoneinfo;python_version<"3.9"
+ tzdata
[options.package_data]
alembic = *.pyi, py.typed