gin
gin copied to clipboard
feat(binding): add support for unixMilli and unixMicro
Related issues: https://github.com/gin-gonic/gin/issues/2634, https://github.com/gin-gonic/gin/issues/1979
This PR adds support for two new time_format
variants: unixMilli
and unixMicro
, the former of which is added to make front-end JavaScript code more convenient to work with.
The implementation is taken from time.UnixMilli and time.UnixMicro, which were introduced to the standard library in go 1.17. For compatibility with go 1.15, these two functions are not used directly.