@@ -109,6 +109,10 @@ func parseDateTime(b []byte) (time.Time, error) {
|
|||||||
return time.Time{}, newDecodeError(b[:1], "invalid timezone offset character")
|
return time.Time{}, newDecodeError(b[:1], "invalid timezone offset character")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if b[3] != ':' {
|
||||||
|
return time.Time{}, newDecodeError(b[3:4], "expected a : separator")
|
||||||
|
}
|
||||||
|
|
||||||
hours := digitsToInt(b[1:3])
|
hours := digitsToInt(b[1:3])
|
||||||
minutes := digitsToInt(b[4:6])
|
minutes := digitsToInt(b[4:6])
|
||||||
seconds := direction * (hours*3600 + minutes*60)
|
seconds := direction * (hours*3600 + minutes*60)
|
||||||
|
|||||||
@@ -2632,6 +2632,10 @@ world'`,
|
|||||||
desc: `invalid number of seconds digits with trailing digit`,
|
desc: `invalid number of seconds digits with trailing digit`,
|
||||||
data: `a=0000-01-01 00:00:000000Z3`,
|
data: `a=0000-01-01 00:00:000000Z3`,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
desc: `invalid number of seconds`,
|
||||||
|
data: `a=0000-01-01 00:00:00+27000`,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
desc: `carriage return inside basic key`,
|
desc: `carriage return inside basic key`,
|
||||||
data: "\"\r\"=42",
|
data: "\"\r\"=42",
|
||||||
|
|||||||
Reference in New Issue
Block a user