Use always internal parsing for iso date/times#413
Use always internal parsing for iso date/times#413elacour wants to merge 1 commit intobestpractical:stablefrom
Conversation
When using RT "unknown" date format, external perl modules are used and
fails:
* Time::ParseDate fail to parse iso format and produce wrong date/time,
* DateTime::Format::Natural claims string isn't parseable.
This is a problem when updating RT DateTime CF from REST where iso8601
is recommended. _CanonicalizeValueDateTime parse input as "unknown" and
produces wrong dates.
|
Before this PR: $ ./test.pl Parsed as "unknown" with Time::ParseDate: 2026-02-12 23:00:00 [900183] [Fri Feb 13 17:38:23 2026] [warning]: Couldn't parse date '2026-02-13T17:16:35Z' by DateTime::Format::Natural Parsed as "iso": 2026-02-13 17:16:35 |
|
Maybe adding a chapter on REST2 doc about doc formats would be nice ? |
I'm inclined to try to get a fix in Time::ParseDate rather than covering up a bug in the RT code. There is actually a PR with a fix: muir/Time-modules#10, but the module is looking for a new maintainer. I'll look into that and see what the options are. |
|
@elacour We adopted Time::ParseData and published a new version with a fix for the iso format issue. Could you update that module and let us know if it fixes the issue for you? |
When using RT "unknown" date format, external perl modules are used and fails:
* Time::ParseDate fail to parse iso format and produce wrong date/time,
* DateTime::Format::Natural claims string isn't parseable.
This is a problem when updating RT DateTime CF from REST where iso8601 is recommended. _CanonicalizeValueDateTime parse input as "unknown" and produces wrong dates.