msgpack-lite icon indicating copy to clipboard operation
msgpack-lite copied to clipboard

MessagePack spec version 2.1 has Timestamp type

Open kawanet opened this issue 8 years ago • 4 comments

https://github.com/msgpack/msgpack/blob/master/spec.md#formats-timestamp

Timestamp extension type is assigned to extension type -1. It defines 3 formats: 32-bit format, 64-bit format, and 96-bit format.

http://frsyuki.hatenablog.com/entry/2017/08/10/144310 (Japanese only)

kawanet avatar Aug 10 '17 09:08 kawanet

Is there a PR for this? I'd love to have this new type in msgpack-lite

mattbishop avatar Nov 19 '17 15:11 mattbishop

WIP

kawanet avatar Nov 24 '17 02:11 kawanet

I'm coming almost close: Timestamp for 64-bit time_t, nanosecond precision and strftime https://www.npmjs.com/package/timestamp-nano

I could rarely find any other msgpack libraries which support the new ext type -1. Here is a C library not merged yet though. https://github.com/ludocode/mpack/commit/1d5e7edbe9

@mattbishop do you know any library that have tests for the type -1?

kawanet avatar Nov 27 '17 10:11 kawanet

I don't know of any but other lib authors will follow your lead. Have you done beta releases of Msgpack before? Might be a good way to get the feature into the public space and trigger others to add their own implementations.

mattbishop avatar Nov 27 '17 16:11 mattbishop