Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
3
import
"time"
4
5
func
Time2Str(t time.Time) string {
6
return
t.Format(
"2006-01-02 15:04:05"
)
7
}
8
func
Unix2Time(t int64) time.Time {
9
return
time.Unix(t, 0)
10
}
Callers
1
TestConvert
Function · 0.92
Calls
no outgoing calls
Tested by
1
TestConvert
Function · 0.74