Registry / serialization / zope-datetime

zope-datetime

JSON →
library6.0pypypi✓ verified 88d ago

Zope datetime provides timezone-aware datetime utilities, including timezone definitions and datetime parsing from common HTTP/email formats. Version 6.0 supports Python >=3.9 and is released periodically as part of the Zope Foundation libraries.

pip install zope.datetime
INSTALL
IMPORT
SIG · ZOPE-DATETIME
Z
zope-datetime
serializationpythonv6.0
Install
1.8s avg
Import
11ms
Disk
20MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v6.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.012s · 18.1MB
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 1.8s · import 0.010s · 19MB
20MB installed
● package 20MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

parseDatetimetz
✓ from zope.datetime import parseDatetimetz
✗ from zope.datetime import parse_datetime
Function name uses CamelCase
RFC850
✓ from zope.datetime import RFC850
✗ from zope.datetime import rfc850
Constant name is uppercase
ZoneInfo
✓ from zope.datetime import ZoneInfo
✗ from zope.datetime import Timezone
Class name is ZoneInfo not Timezone

Parse datetime strings using common formats.

from zope.datetime import parseDatetimetz from datetime import datetime # Parse an HTTP-date (RFC 1123) dt = parseDatetimetz('Mon, 27 Apr 2026 12:00:00 GMT') print(dt) # timezone-aware datetime # Parse a datetime with timezone offset dt2 = parseDatetimetz('2026-04-27T12:00:00+02:00') print(dt2)
Debug
Known issues
breakingVersion 6.0 requires Python >=3.9 and may have changed internal timezone handling. Code relying on pytz objects might break if now using zoneinfo.
fix
Ensure compatibility: if using pytz, convert to zoneinfo or keep using pytz, but test edge cases.
affects: >=6.0
gotchaFunction parseDatetimetz does NOT parse all ISO 8601 strings; it only handles a subset (RFC 2822, RFC 850, ANSI C, and a few others).
fix
Use dateutil.parser.isoparse or datetime.fromisoformat for general ISO 8601 parsing.
affects: all
deprecatedThe module zope.datetime may be considered legacy; for new projects consider using dateutil or built-in zoneinfo (Python 3.9+).
fix
Migrate to dateutil or built-in module.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'zope.datetime'
Package installed as 'zope-datetime' but import path is 'zope.datetime'.
fix
Install the correct package: pip install zope-datetime
AttributeError: module 'zope.datetime' has no attribute 'parse_datetime'
Function name is parseDatetimetz (CamelCase), not parse_datetime.
fix
Use: from zope.datetime import parseDatetimetz
ValueError: unknown timezone offset
Parsing a timezone offset like 'Europe/Berlin' that isn't an integer offset.
fix
The function parseDatetimetz only handles ±HHMM offsets, not named timezones. Pre-process with pytz or zoneinfo.
Upgrade
Version history
6.0latest on PyPI · released Sep 12, 2025
Audit
Dependencies
pytzoptionalUsed for timezone definitions; optional if using only UTC
Agent activity
43 hits · last 30 days
node
34
Anthropic
1
OpenAI (training)
1
Resources
zope-datetime — pip install zope-datetime · libregistry