HomeClusterLabs Projects

Fix: libcrmcommon: allow ISO 8601 strings of form "<date>T<time> <offset>"

Description

Fix: libcrmcommon: allow ISO 8601 strings of form "<date>T<time> <offset>"

Previously, the date parser would look for the time portion of the string by
searching for the first space, or if none, the first 'T'. However that would
incorrectly find the offset for the common form "<date>T<time> <offset>".

The new search does not perfectly detect all invalid formats (e.g. extra digits
at end of a YYYYMMDD will simply be ignored), but it should be reasonable.

Details

Provenance
kgaillotAuthored on Sep 27 2019, 10:00 AM
Parents
rPc0b1645c1da7: Refactor: libcrmcommon: add seconds to a time object more efficiently
Branches
Unknown
Tags
Unknown

Event Timeline