Use always internal parsing for iso date/times#413
Open
elacour wants to merge 1 commit intobestpractical:stablefrom
Open
Use always internal parsing for iso date/times#413elacour wants to merge 1 commit intobestpractical:stablefrom
elacour 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.
Contributor
Author
|
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 |
Contributor
Author
|
Maybe adding a chapter on REST2 doc about doc formats would be nice ? |
Member
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.