proposal: time: add UnixMilli and UnixMicro #44412
This is a follow on from #44196.
It is common for go services to interact with external applications that use timestamps in milliseconds and microseconds, and currently conversion between these formats and Go's internal time is fiddly and error prone.
In #44196 we added Time.UnixMillis() and Time.UnixMicros() to allow go programs to convert to milliseconds and microseconds in an obvious, easy way. I propose we add the symmetrical methods to allow go programs to convert from these formats.
Correctly implementing the conversion from milliseconds to time is something people struggle with. Assuming that you only care about the range supported by
Instead of pushing the burden for figuring out to end-users of the language, I propose we provide a robust implementation of
For symmetry with
(NOTE: The current package has
The text was updated successfully, but these errors were encountered:
Awesome! I was just thinking this while playing with the Atlassian API (https://developer.atlassian.com/cloud/confluence/rest/api-group-audit/#api-api-audit-get)
Thanks for all the work