mirror of
https://github.com/msgpack/msgpack-python.git
synced 2025-10-20 12:23:16 +00:00
Synchronize handling of datetime in Packer implementations (#434)
The handling of datetime is different in the cython and Python implementations. In contrast to the docs, timezone is not required in the Python implementation.
This commit is contained in:
parent
5614dd5a89
commit
772c830841
1 changed files with 1 additions and 1 deletions
|
@ -921,7 +921,7 @@ class Packer(object):
|
|||
len(obj), dict_iteritems(obj), nest_limit - 1
|
||||
)
|
||||
|
||||
if self._datetime and check(obj, _DateTime):
|
||||
if self._datetime and check(obj, _DateTime) and obj.tzinfo is not None:
|
||||
obj = Timestamp.from_datetime(obj)
|
||||
default_used = 1
|
||||
continue
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue