DateTime
This package provides a DateTime data type, as known from Zope. Unless you need to communicate with Zope APIs, you're probably better off using Python's built-in datetime module.
What it is and what it does
DateTime is a specialized date/time type originating from Zope that encapsulates date and time values with built-in timezone awareness and conversion. It maintains an absolute UTC value internally while allowing representation in any recognized timezone. The package parses a wide variety of date/time string formats (flexible enough to handle North American conventions) and supports numeric operations—subtracting two DateTime objects yields days between them, and adding/subtracting numbers from a DateTime shifts it by that many days.
The package is explicitly positioned as a Zope integration tool; the documentation itself recommends Python's built-in datetime module for most use cases unless you need to communicate with Zope APIs. It depends on zope.interface and pytz, and supports Python 3.10 through 3.14 on both CPython and PyPy. No vulnerabilities are currently known.
Use it for:
- Integrating with Zope-based applications or APIs that expect DateTime objects.
- Parsing flexible date/time strings in North American formats without manual validation.
- Converting between multiple timezones while maintaining an immutable absolute time value.
- Performing date arithmetic (adding/subtracting days) on datetime objects.
- Legacy systems or codebases that already use Zope's DateTime and need to continue doing so.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides a DateTime data type for working with date and time values, primarily designed for Zope integration but usable standalone with support for timezone conversion and flexible date/time string parsing.
Yes, if you are working with Zope or a codebase that already depends on DateTime. No, if you are starting a new project—Python's built-in datetime module is more standard and better documented. The package is mature, actively maintained, has no known vulnerabilities, and installs easily, but its license treatment is unclear and it adds a dependency for functionality that the standard library already provides.
Install
datetime on PyPI
pip
pip install datetimeuv
uv add datetimepoetry
poetry add datetimeInstalling DateTime
Before you install
Low friction installation with a pure-Python wheel. Actively maintained as of 2025-11-25 with recent commits and support for current Python versions (3.10–3.14). No known vulnerabilities.
License in practice
Licensed under ZPL-2.1 (Zope Public License); license treatment is marked unclear in the fact sheet, so review the license terms before use in proprietary or commercial projects.
Quickstart
from DateTime import DateTime
# Current time in US/Eastern timezone
e = DateTime('US/Eastern')
print(e.timezone())
# Parse ISO 8601 date (defaults to UTC)
z = DateTime('2014-03-24')
print(z.parts())
Requires Python 3.10 or later.
Verify before relying
- Whether ZPL-2.1 is compatible with your project's license requirements (marked 'unclear' in metadata).
- Performance characteristics when handling large volumes of DateTime objects or frequent timezone conversions.
Package facts
| License | ZPL-2.1 (unclear) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — zope.interface, pytz |
| Maintenance | actively maintained — 262 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 16,702,528/month — #1,142 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: datetime-6.0-py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
udatetimeudatetime provides fast RFC3339-compliant…
permissive · top 15,000 on PyPI
zope.datetimeParses and formats date/time strings in common…
unclear · top 15,000 on PyPI
dateformatParses strings into datetime objects and…
permissive · top 15,000 on PyPI
pytzpytz brings the Olson timezone database into…
permissive · top 100 on PyPI
metomi-isodatetimeParses and manipulates ISO 8601 date-time…
copyleft · top 15,000 on PyPI
isodateParses and formats ISO 8601 date, time,…
permissive · top 1,000 on PyPI
timesTimes converts between universal (UTC) time and…
permissive · top 15,000 on PyPI
deloreanDelorean simplifies Python datetime…
permissive · top 15,000 on PyPI
django-timezone-fieldProvides Django database, form, and REST…
permissive · top 5,000 on PyPI
mayaMaya provides a human-friendly API for parsing,…
permissive · top 15,000 on PyPI