[5.4] Fix double timezone conversion in Media Manager file dates#47433
Merged
muhme merged 3 commits intojoomla:5.4-devfrom Apr 1, 2026
Merged
[5.4] Fix double timezone conversion in Media Manager file dates#47433muhme merged 3 commits intojoomla:5.4-devfrom
muhme merged 3 commits intojoomla:5.4-devfrom
Conversation
Contributor
|
great spot!! |
|
I have tested this item ✅ successfully on 0cde490 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47433. |
Contributor
|
I have tested this item ✅ successfully on 0cde490 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47433. |
Contributor
|
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47433. |
Contributor
|
✅ Final test before merge with JBT
|
Contributor
|
Thank you @krishnagandhicode for your contribution. Thank you @exlemor and @tecpromotion for testing. |
Contributor
Author
|
Thanks for the merge, and thanks to everyone who helped with Testing. |
adarshdubey03
pushed a commit
to adarshdubey03/joomla-cms
that referenced
this pull request
Apr 5, 2026
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.
Pull Request resolves #29134
Summary of Changes
This PR fixes an issue where the Media Manager applies the user's timezone offset 2 times which results in incorrect "Date Created" and "Date Modified" times
In the local filesystem adapter,
create_date_formattedandmodified_date_formattedwere generated usingHTMLHelpreven though the date objects had already been adjusted to the configured timezone.That caused the timezone conversion to be applied again in formatting, which produced shifted times confusion
The fix now formats the existing Date objects directly:
-
create_date_formatteduses$createDate->format(Text::_('DATE_FORMAT_LC5'), true)and similarly for modified_date_formatted.Testing Instructions
Go to System -> global Config -> under Server look for Location.

Change your Website Time Zone from UTC to a timezone with a some offset like for Asia/Kolkata (UTC+5:30), to make the bug visible.
now go to content -> media Upload an image and make sure to note your actual time.
now click on that i(info) button in top right and then click on the image you just uploaded - you get the details.
Actual result BEFORE applying this Pull Request
The "Date Created" time is shifted 2 times by the timezone offset . (e.g. as in my shared case if you set the timezone to UTC+5:30 now the timestamp will display exactly 11 hours ahead of UTC time instead of 5.5 hours).
In this SS as you can see that in my Windows Clock(bottom right) it UTC +5:30 : 16:30
and Joomla took the 11:00 UTC time, added the +5:30 offset once, and then added the +5:30 offset a second time, resulting in exactly 22:00)
as you see in the created Date : 22:00
I deliberately uploaded the file at exactly 16:30 IST(11:00 UTC, Kolkata) to make the math easy/clear : )
Expected result AFTER applying this Pull Request
The "Date Created" time reflects the time in whatever timezone is currently set in the Global Configuration - without any extra offsets
For my shared example: now it shows 16:30 (beacuse I uploaded it at 16:30 IST)

You can also test by uploading new images..
Link to documentations
Please select:
Documentation link for guide.joomla.org:
No documentation changes for guide.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed