The contract for a timestamp requires that a timestamp with a negative seconds component must have a negative nanos component. As currently implemented, the nanos component will always be positive when converting from a chrono DateTime. This may cause issues with downstream consumers who expect that the nanos field will follow the behavior defined in the documentation and require a timestamp from before 1970.
For reference on how to correct this, see the implementation of From<SystemTime> in prost-types. (It would also be nice if pbjson-types included a From<SystemTime> implementation as well.)
The contract for a timestamp requires that a timestamp with a negative
secondscomponent must have a negativenanoscomponent. As currently implemented, thenanoscomponent will always be positive when converting from a chrono DateTime. This may cause issues with downstream consumers who expect that thenanosfield will follow the behavior defined in the documentation and require a timestamp from before 1970.For reference on how to correct this, see the implementation of
From<SystemTime>inprost-types. (It would also be nice ifpbjson-typesincluded aFrom<SystemTime>implementation as well.)