Skip to content

fix: horde/whups#21 Wrong date/time format in ticket history - #23

Merged
ralflang merged 1 commit into
FRAMEWORK_6_0from
fix/issue-21-wrong-date-time
Sep 18, 2026
Merged

ralflang merged 1 commit into
FRAMEWORK_6_0from
fix/issue-21-wrong-date-time

Conversation

@ralflang

@ralflang ralflang commented Sep 17, 2026 •

Copy link
Copy Markdown
Member

Partially Fixes #21

@schweiger

Copy link
Copy Markdown

I think when calling DateFormat::formatDate() locale should be set to $GLOBALS['language'].

@ralflang

Copy link
Copy Markdown
Member Author

This would be a step backwards.

$GLOBALS['language'] comes from session, prefs or explicitly passed parameter if it is set at all - and increasingly we don't want to set it.

So we should have an Injectable (in core) which only resolves language preference in the legacy order and we should use it (in whups) when formatting the date as it might use a language code specific pattern. What we should NOT do is set the locale as the whole point of IntlDateFormatter is locale-independent behaviour even if rendering for a specific language code.

@ralflang
ralflang merged commit f893494 into FRAMEWORK_6_0 Sep 18, 2026
1 check failed
ralflang added a commit that referenced this pull request Oct 1, 2026
ralflang added a commit that referenced this pull request Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: wrong date / time format in ticket history

2 participants