github.com/keltia/go-ipfs@v0.3.8-0.20150909044612-210793031c63/util/time_test.go (about)

     1  package util
     2  
     3  import (
     4  	"testing"
     5  	"time"
     6  )
     7  
     8  func TestTimeFormatParseInversion(t *testing.T) {
     9  	v, err := ParseRFC3339(FormatRFC3339(time.Now()))
    10  	if err != nil {
    11  		t.Fatal(err)
    12  	}
    13  	if v.Location() != time.UTC {
    14  		t.Fatal("Time should be UTC")
    15  	}
    16  }