[5.3] Fix date format to use ISO 8601 in SchemaorgPrepareDateTrait
Pull Request for Issue #45555 and #42196.
Summary of Changes
Fix date date format to use ISO 8601 (DateTime::ATOM) in in SchemaorgPrepareDateTrait.
Testing Instructions
- Create or edit an article.
- Enable structured data output using the Schema tab on the standard create article screen.
- Choose any schema type that has a date field in the form (e. g. Article).
- Use the built-in date picker to choose either a 'Date Created' or 'Date Modified' or both.
- Validate the page using a structured data testing tool.
https://search.google.com/test/rich-results
- Apply the path via Patchtester or the testing package
- Repeat the steps above and check the result.
Actual result BEFORE applying this Pull Request
Expected result AFTER applying this Pull Request
Link to documentations
Please select:
-
[ ] Documentation link for docs.joomla.org:
-
[X] No documentation changes for docs.joomla.org needed
-
[ ] Pull Request link for manual.joomla.org:
-
[X] No documentation changes for manual.joomla.org needed
I have tested this item :white_check_mark: successfully on 2a86f07f5b13004abc97c4ba59590e41bea72a39
With the patch applied I see the output date change from "dateModified": "2025-06-10", to "dateModified": "2025-06-10T00:00:00+00:00", and the Rich Results report passes (apart from flagging a Breadcrumbs problem).
But I wonder if this is the right solution. Should we store and output the time?
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45581.
@ceford I think that's a bit of a question of taste. But I think the date and the correct format are particularly relevant for the search engines. I am completely neutral here and don't really have an opinion. Thank you for testing 💚
I have tested this item :white_check_mark: successfully on 8314c240053fc069059dd177a8e170dd31453903
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45581.
Thanks