msgpack / msgpack

MessagePack is an extremely efficient object serialization library. It's like JSON, but very fast and small.

Home Page:http://msgpack.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add timestamp for date only (days since 1970-01-01, years since 1970).

mincequi opened this issue · comments

timestamp 16 stores the number of days that have elapsed since 1970-01-01 00:00:00 UTC
in an 16-bit unsigned integer:
+--------+--------+-----------------+-----------------+
| 0xd5 | -1 | days in 16-bit unsigned int |
+--------+--------+-----------------+-----------------+

timestamp 8 stores the number of years that have elapsed since 1970-01-01 00:00:00 UTC
in an 8-bit unsigned integer:
+--------+--------+-----------------------------------+
| 0xd4 | -1 | years in 8-bit unsigned int |
+--------+--------+-----------------------------------+

What do you think?