mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-05 00:54:35 +08:00
22 lines
332 B
Go
22 lines
332 B
Go
package utils
|
|
|
|
import (
|
|
"testing"
|
|
"time"
|
|
)
|
|
|
|
func TestUnixTime(t *testing.T) {
|
|
for i := 0; i < 5; i++ {
|
|
t.Log(UnixTime(), "real:", time.Now().Unix())
|
|
time.Sleep(1 * time.Second)
|
|
}
|
|
}
|
|
|
|
func TestGMTUnixTime(t *testing.T) {
|
|
t.Log(GMTUnixTime(time.Now().Unix()))
|
|
}
|
|
|
|
func TestGMTTime(t *testing.T) {
|
|
t.Log(GMTTime(time.Now()))
|
|
}
|