joomla-cms icon indicating copy to clipboard operation
joomla-cms copied to clipboard

[5.3] Fix date format to use ISO 8601 in SchemaorgPrepareDateTrait

Open LadySolveig opened this issue 6 months ago • 2 comments

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

  1. Create or edit an article.
  2. Enable structured data output using the Schema tab on the standard create article screen.
  3. Choose any schema type that has a date field in the form (e. g. Article).
  4. Use the built-in date picker to choose either a 'Date Created' or 'Date Modified' or both.
  5. Validate the page using a structured data testing tool.

https://search.google.com/test/rich-results

Actual result BEFORE applying this Pull Request

image

Expected result AFTER applying this Pull Request

image

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

LadySolveig avatar Jun 08 '25 21:06 LadySolveig

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 avatar Jun 10 '25 12:06 ceford

@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 💚

LadySolveig avatar Jun 10 '25 13:06 LadySolveig

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.

bembelimen avatar Sep 20 '25 15:09 bembelimen

Thanks

bembelimen avatar Sep 20 '25 15:09 bembelimen