Add test for RFC3339 time format fixes #257

This commit is contained in:
TeoV
2019-05-10 12:59:12 +03:00
committed by Dan Christian Bogos
parent 60fbbc254d
commit 48d7c320ca

View File

@@ -311,6 +311,12 @@ func TestParseTimeDetectLayout(t *testing.T) {
t.Errorf("Expecting: %v, received: %v", expected, date)
}
date, err = ParseTimeDetectLayout("2014-11-25T00:00:00+01:00", "")
expected = time.Date(2014, 11, 24, 23, 0, 0, 0, time.UTC)
if err != nil || !date.UTC().Equal(expected.UTC()) {
t.Errorf("Expecting: %v, received: %v", expected.UTC(), date.UTC())
}
}
func TestRoundDuration(t *testing.T) {