RFC: introduce notations for Duration
and Timestamp
and remove dangerous OfNat
instances
#6793
Labels
P-medium
We may work on this issue if we find the time
RFC accepted
RFC is waiting for a corresponding PR (external or internal)
RFC
Request for comments
Proposal
We currently provide
OfNat Duration
andOfNat Timestamp
instances which turn natural numbers into seconds and seconds since Unix epoch, respectively. Keeping with the design of "make incorrect conversions impossible and make dubious conversions explicit", we should change this as follows:Duration
types (this was considered during initial implementation, but was postponed to reduce the size of the PR).Timestamp.ofDurationSinceUnixEpoch
(this is just the constructor).OfNat Duration
andOfNat Timestamp
instances.Timestamp
that allows entering a timestamp with time zone in ISO format without having to go throughZonedDateTime
.Impact
Add 👍 to issues you consider important. If others benefit from the changes in this proposal being added, please ask them to add 👍 to it.
The text was updated successfully, but these errors were encountered: