The DateTime package provides a specific DateTime data type primarily intended for use within Zope applications and APIs. It aims to offer a consistent date/time representation within that ecosystem. Currently at version 6.0, this library is actively maintained by the Zope Foundation, with releases generally tied to Zope's development cycle, though less frequently than core Python modules.
pip install DateTimeVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to create `DateTime` objects, access their components, and convert them to Python's standard `datetime.datetime` objects. It's crucial for Zope compatibility and integration with other Python libraries.
For general date/time operations, use `import datetime`. Only use `from DateTime import DateTime` if you have a specific need for Zope compatibility.
Ensure your packaging tools and environment are compatible with PEP 420 namespace packages. Update setuptools or build tools if necessary.
Repickle any persisted DateTime objects using version 5.5+ or implement a migration strategy if you rely on long-term persistence of DateTime objects across this version boundary.
Always explicitly specify the desired timezone when creating `DateTime` objects, or use `DateTime.asdatetime()` and Python's `zoneinfo` module for explicit timezone handling.
Use Python's rich comparison operators (`<`, `>`, `==`, `<=`, `>=`, `!=`) instead of `cmp()` or direct calls to `__cmp__`.
Install the module using 'pip install DateTime'.
Rename the script to avoid naming conflicts with standard library modules.
Rename the script to avoid naming conflicts with standard library modules.
Convert the `DateTime` object to a compatible numeric type (e.g., float representing seconds since epoch) or ensure all operands are `DateTime` objects for arithmetic operations. Example: `dt_object.timeTime() - some_int_seconds` or `float(dt_object) - some_other_float`.
Provide a valid date/time string in a format that the `DateTime` constructor can parse, or use the constructor with specific numeric arguments (year, month, day, etc.).
No dependency data recorded yet.