mirror of
https://github.com/araddon/dateparse.git
synced 2024-11-10 11:51:54 +08:00
Add test for Date format w a Z
This commit is contained in:
parent
a19b713c2e
commit
86f3852b68
@ -231,6 +231,11 @@ func TestParse(t *testing.T) {
|
|||||||
//u.Debug(ts.In(time.UTC).Unix(), ts.In(time.UTC))
|
//u.Debug(ts.In(time.UTC).Unix(), ts.In(time.UTC))
|
||||||
assert.T(t, "2009-08-13 05:15:09 +0000 UTC" == fmt.Sprintf("%v", ts.In(time.UTC)))
|
assert.T(t, "2009-08-13 05:15:09 +0000 UTC" == fmt.Sprintf("%v", ts.In(time.UTC)))
|
||||||
|
|
||||||
|
ts, err = ParseAny("2009-08-12T22:15:09Z")
|
||||||
|
assert.Tf(t, err == nil, "%v", err)
|
||||||
|
//u.Debug(ts.In(time.UTC))
|
||||||
|
assert.T(t, "2009-08-12 22:15:09 +0000 UTC" == fmt.Sprintf("%v", ts.In(time.UTC)))
|
||||||
|
|
||||||
ts, err = ParseAny("2009-08-12T22:15:09")
|
ts, err = ParseAny("2009-08-12T22:15:09")
|
||||||
assert.Tf(t, err == nil, "%v", err)
|
assert.Tf(t, err == nil, "%v", err)
|
||||||
//u.Debug(ts.In(time.UTC))
|
//u.Debug(ts.In(time.UTC))
|
||||||
|
Loading…
Reference in New Issue
Block a user