mirror of
https://github.com/ipfs/kubo.git
synced 2025-09-10 14:34:24 +08:00

test(time) expose time format var License: MIT Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
17 lines
249 B
Go
17 lines
249 B
Go
package util
|
|
|
|
import (
|
|
"testing"
|
|
"time"
|
|
)
|
|
|
|
func TestTimeFormatParseInversion(t *testing.T) {
|
|
v, err := ParseRFC3339(FormatRFC3339(time.Now()))
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
if v.Location() != time.UTC {
|
|
t.Fatal("Time should be UTC")
|
|
}
|
|
}
|