Datetime

Latest version: v5.5

Safety actively analyzes 629639 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 7

3.0.3

------------------

- Allow timezone argument to be a Unicode string while creating a DateTime
object using two arguments.

3.0.2

------------------

- LP 1045233: Respect date format setting for parsing dates like `11-01-2001`.

3.0.1

------------------

- Add `_dt_reconstructor` function introduced in DateTime 2.12.7 to provide
forward compatibility with pickles that might reference this function.

3.0

----------------

- No changes.

Backwards compatibility of DateTime 3
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

DateTime 3 changes its pickle representation. DateTime instances pickled with
former versions of DateTime can be read, but older DateTime versions cannot read
DateTime instances pickled with version 3.

DateTime 3 changes DateTime to be a new-style class with slots instead of being
an old-style class.

DateTime 3 tries to preserve microsecond resolution throughout most of its API's
while former versions were often only accurate to millisecond resolution. Due to
the representation of float values in Python versions before Python 2.7 you
shouldn't compare string or float representations of DateTime instances if you
want high accuracy. The same is true for calculated values returned by methods
like `timeTime()`. You get the highest accuracy of comparing DateTime values by
calling its `micros()` methods. DateTime is not particular well suited to be
used in comparing timestamps of file systems - use the time and datetime objects
from the Python standard library instead.

3.0b3

------------------

- Allow comparison of DateTime objects against None.

3.0b2

------------------

- Reverted the single argument `None` special case handling for unpickling and
continue to treat it as meaning `now`.

Page 4 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.