Fix panic with time marshalling

This commit is contained in:
Dan Sosedoff
2022-12-05 21:46:07 -06:00
parent 5228eca9ae
commit be81fdab41
2 changed files with 32 additions and 0 deletions

View File

@@ -73,6 +73,12 @@ func (res *Result) PostProcess() {
if hasBinary(val, 8) && BinaryCodec != CodecNone {
res.Rows[i][j] = encodeBinaryData([]byte(val), BinaryCodec)
}
case time.Time:
if val.Year() < 0 || val.Year() >= 10000 {
res.Rows[i][j] = "ERR: INVALID_DATE"
} else {
res.Rows[i][j] = val
}
}
}
}