MCPcopy Create free account
hub / github.com/code-scan/Goal / Time2Str

Function Time2Str

Gconvert/time.go:5–7  ·  view source on GitHub ↗
(t time.Time)

Source from the content-addressed store, hash-verified

3import "time"
4
5func Time2Str(t time.Time) string {
6 return t.Format("2006-01-02 15:04:05")
7}
8func Unix2Time(t int64) time.Time {
9 return time.Unix(t, 0)
10}

Callers 1

TestConvertFunction · 0.92

Calls

no outgoing calls

Tested by 1

TestConvertFunction · 0.74