gin icon indicating copy to clipboard operation
gin copied to clipboard

feat(binding): add support for unixMilli and unixMicro

Open peakji opened this issue 1 year ago • 0 comments

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.

peakji avatar Jul 28 '22 10:07 peakji