Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: 5.3-dev
Choose a base branch
from

Conversation

LadySolveig
Copy link
Contributor

@LadySolveig LadySolveig commented Jun 8, 2025

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:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

@ceford
Copy link
Contributor

ceford commented Jun 10, 2025

I have tested this item ✅ successfully on 2a86f07

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.

@LadySolveig
Copy link
Contributor Author

LadySolveig commented Jun 10, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants