Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
MessagePack timestamp type #168
This PR implements the timestamp type of MessagePack: timestamp32, imestamp64, and timestamp96. It also registers Time as the timestamp type for DefaultFactory.
This is the core logic for the timestamp type.
This is independent from the built-in Time class because I'll use the timestamp type in a Rails app, overriding it by
This PR does not change the default behavior because it is not a trivial thing.
@gfx It's better to have if possible!
I'm thinking about the option to move code in
I think MessagePack::Time and MessagePack::Timestamp are completely different classes.
MessagePack::Timestamp provides utilities for implementing a MessagePack timestamp mapping.
MessagePack::Time provides the packer and unpacker for built-in Time class. If msgpack-ruby supports ActiveSupport::TImeWithZone, its name will be MessagePack::ActiveSupportTimeWithZone or something alike.