2727 {[]byte ("2014-12-15T08:00:00" ), time .Date (2014 , 12 , 15 , 8 , 0 , 0 , 0 , time .UTC ), "2014-12-15T08:00:00.000Z" , "2014-12-15T08:00:00.000Z" },
2828 {[]byte ("2014-12-15T08:00" ), time .Date (2014 , 12 , 15 , 8 , 0 , 0 , 0 , time .UTC ), "2014-12-15T08:00:00.000Z" , "2014-12-15T08:00:00.000Z" },
2929 {[]byte ("2014-12-15T08:00Z" ), time .Date (2014 , 12 , 15 , 8 , 0 , 0 , 0 , time .UTC ), "2014-12-15T08:00:00.000Z" , "2014-12-15T08:00:00.000Z" },
30- {[]byte ("2018-01-28T23:54Z" ), time .Date (2018 , 01 , 28 , 23 , 54 , 0 , 0 , time .UTC ), "2018-01-28T23:54:00.000Z" , "2018-01-28T23:54:00.000Z" },
30+ {[]byte ("2018-01-28T23:54Z" ), time .Date (2018 , 0o1 , 28 , 23 , 54 , 0 , 0 , time .UTC ), "2018-01-28T23:54:00.000Z" , "2018-01-28T23:54:00.000Z" },
3131 {[]byte ("2014-12-15T08:00:00.000Z" ), time .Date (2014 , 12 , 15 , 8 , 0 , 0 , 0 , time .UTC ), "2014-12-15T08:00:00.000Z" , "2014-12-15T08:00:00.000Z" },
3232 {[]byte ("2011-08-18T19:03:37.123000000+01:00" ), time .Date (2011 , 8 , 18 , 19 , 3 , 37 , 123 * 1e6 , p .Location ()), "2011-08-18T19:03:37.123+01:00" , "2011-08-18T18:03:37.123Z" },
3333 {[]byte ("2011-08-18T19:03:37.123000+0100" ), time .Date (2011 , 8 , 18 , 19 , 3 , 37 , 123 * 1e6 , p .Location ()), "2011-08-18T19:03:37.123+01:00" , "2011-08-18T18:03:37.123Z" },
@@ -134,8 +134,8 @@ func TestDateTime_IsDateTime_errorCases(t *testing.T) {
134134
135135 v = IsDateTime ("1972-12-31T23:59:60.000Z" )
136136 assert .False (t , v )
137-
138137}
138+
139139func TestDateTime_UnmarshalText_errorCases (t * testing.T ) {
140140 pp := NewDateTime ()
141141 err := pp .UnmarshalText ([]byte ("yada" ))
@@ -159,6 +159,7 @@ func TestDateTime_UnmarshalText(t *testing.T) {
159159
160160 }
161161}
162+
162163func TestDateTime_UnmarshalJSON (t * testing.T ) {
163164 for caseNum , example := range testCases {
164165 t .Logf ("Case #%d" , caseNum )
@@ -199,6 +200,7 @@ func TestDateTime_MarshalText(t *testing.T) {
199200 assert .Equal (t , []byte (example .str ), mt )
200201 }
201202}
203+
202204func TestDateTime_MarshalJSON (t * testing.T ) {
203205 for caseNum , example := range testCases {
204206 t .Logf ("Case #%d" , caseNum )
@@ -208,6 +210,7 @@ func TestDateTime_MarshalJSON(t *testing.T) {
208210 assert .Equal (t , esc ([]byte (example .str )), bb )
209211 }
210212}
213+
211214func TestDateTime_MarshalJSON_Override (t * testing.T ) {
212215 oldNormalizeMarshal := NormalizeTimeForMarshal
213216 defer func () {
0 commit comments