Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
Having a timestamp string in 12-hour format can be parsed if the hour is 0, however, based on the design document, it should be rejected.
How to reproduce
Run
select cast("2020-01-01 0 am 00" as timestamp format "yyyy-mm-dd hh12 p.m. ss")
It shouldn' t be parsed, as the hour component is 0.
Spec
Pattern | Meaning | Additional details |
---|---|---|
HH12 | Hour of day (1-12) | Same as HH |
HH | Hour of day (1-12) |
|