Module Name: src Committed By: kre Date: Mon Oct 19 15:05:53 UTC 2020
Modified Files: src/lib/libutil: parsedate.y Log Message: POSIX requires that when converting 2 digit year representations to actual specific years, values from 69-99 be treated as 20th century, and values from 0-68 be treated as 21st century. This allows for those unfortunate enough to reside in a timezone west of Greenwich to convert the epoch (or a time very close to it) to text, write that with just two digits, and correctly convert it back to a time near the epoch, rather than to something in 2069. We used to split things so 0-69 were 21st century, and 70-99 were 20th. Change that (this requires a change in the parsedate ATF tests which test this specific boundary). While here, add support for another POSIX requirement, that the radix char before fractional seconds can be either a ',' or a '.'. We used to allow only '.', add support for ','. This is something of a meaningless change, as parsedate() returns a time_t in which there is no way to represent fractional seconds, so there's little point in ever specifying them regardless of what char is used for the "decimal point" - they will be ignored anyway. But at least fractional seconds using a ',' as the radix char will no longer cause the conversion to fail (or do something else bizarre). To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/lib/libutil/parsedate.y Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.