time_test.go 249 Bytes
Newer Older
Jeromy's avatar
Jeromy committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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")
	}
}