From ec7077ee70e9f9e9470a88f49693d1376b136ee7 Mon Sep 17 00:00:00 2001 From: "Vanya A. Sergeev" Date: Sun, 3 Mar 2019 19:12:33 -0600 Subject: [PATCH] add note about naive/aware timestamps to README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 3cd9ee1..20360ed 100644 --- a/README.md +++ b/README.md @@ -401,6 +401,7 @@ If a non-byte-string argument is passed to `umsgpack.unpackb()`, it will raise a * Python float types are packed into the msgpack float32 or float64 format depending on the system's `sys.float_info` * The Python `datetime.datetime` type is packed into, and unpacked from, the msgpack `timestamp` format * Note that this Python type only supports microsecond resolution, while the msgpack `timestamp` format supports nanosecond resolution. Timestamps with finer than microsecond resolution will lose precision during unpacking. Users may override the packing and unpacking of the msgpack `timestamp` format with a custom type for alternate behavior. + * Both naive and aware timestamp are supported. Naive timestamps are packed as if they are in the UTC timezone. Timestamps are always unpacked as aware `datetime.datetime` objects in the UTC timezone. ## Testing