I'm not 100% sure what this should look like, since its shape is really just LocalDateTime. InstantUTC should also be a member of Eq and Ord, and its implementations will look exactly the same. The only real difference is the logic when converting to/from Instant (where LocalDateTime simply drops/adds an offset, while InstantUTC adjusts the underlying datetime to accommodate the new offset).
I'm not 100% sure what this should look like, since its shape is really just
LocalDateTime
.InstantUTC
should also be a member ofEq
andOrd
, and its implementations will look exactly the same. The only real difference is the logic when converting to/fromInstant
(whereLocalDateTime
simply drops/adds an offset, whileInstantUTC
adjusts the underlying datetime to accommodate the new offset).E.g.: