diff options
author | Inada Naoki <songofacandy@gmail.com> | 2019-12-12 19:43:59 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-12 19:43:59 +0900 |
commit | 887d3a7d22865d36d68fdcb5e653ea61d66f0b61 (patch) | |
tree | 5c08d924923007eb5dbeac180477f59ec3c02651 /msgpack/fallback.py | |
parent | aab29ff277cf88ff85e7ea5e603607a24d8c38a4 (diff) | |
download | msgpack-python-887d3a7d22865d36d68fdcb5e653ea61d66f0b61.tar.gz |
Refine Timestamp APIs (#395)
Diffstat (limited to 'msgpack/fallback.py')
-rw-r--r-- | msgpack/fallback.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/msgpack/fallback.py b/msgpack/fallback.py index 9ba98bf..08e8d46 100644 --- a/msgpack/fallback.py +++ b/msgpack/fallback.py @@ -691,9 +691,9 @@ class Unpacker(object): if n == -1: # timestamp ts = Timestamp.from_bytes(bytes(obj)) if self._timestamp == 1: - return ts.to_float() + return ts.to_unix() elif self._timestamp == 2: - return ts.to_unix_ns() + return ts.to_unix_nano() elif self._timestamp == 3: return ts.to_datetime() else: |