-
Notifications
You must be signed in to change notification settings - Fork 164
Open
@cacharle
Description
I currently have this snippet to all std::chrono::system_clock::time_point to be (de)serialized. I think it would be nice to have something to convert this useful type.
namespace rfl { template <> struct Reflector<std::chrono::system_clock::time_point> { using ReflType = std::string; static std::chrono::system_clock::time_point to(const ReflType &s) { return intellis::timePointFromIso8601(s); } static ReflType from(const std::chrono::system_clock::time_point &tp) { return intellis::timePointToIso8601<std::chrono::microseconds>(tp); } };
I know that rfl::Timestamp exists but it is limited to seconds which is a deal breaker in my use case.
Metadata
Metadata
Assignees
Labels
No labels