#6525 closed defect (fixed)
OGRParseDate accepts 61 seconds
Reported by: | Ari Jolma | Owned by: | warmerdam |
---|---|---|---|
Priority: | low | Milestone: | |
Component: | default | Version: | unspecified |
Severity: | normal | Keywords: | |
Cc: |
Description
According to wikipedia article on ISO 8601 accepts 60 seconds in a date to denote leap seconds. However, OGRParseDate accepts 61 seconds.
Additionally, shouldn't OGRParseDate set an error state with CPLError if the provided timestamp is not ok?
Note:
See TracTickets
for help on using tickets.
You're probably right about the test > 61 that should be changed to >= 61 or > 60 (not sure why, but I think I read somewhere that there could potential have 2 leap seconds, but cannot find any evidence of that).
Regarding emitting CPLError(), I'm not sure as OGRParseDate() is used in various places, such as in the CSV or GeoJSON driver to guess if a string field is a generic field or a datetime fields. In those use cases, we don't want an error to be emitted.