Title: datePublished &amp; dateModified schema wrong
Last modified: October 14, 2023

---

# datePublished & dateModified schema wrong

 *  Resolved [Jimmy Ahyari](https://wordpress.org/support/users/71mm0/)
 * (@71mm0)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/datepublished-datemodified-schema-wrong/)
 * Sometimes I feel surprised, even though the article has just been posted, but
   on Google or Google News, the time it appears is not right.
 * After I looked at the HTML source, I found something strange in the schema created
   by AIO SEO.
 * For example in this post: [https://teknologi.info/2612213/rekomendasi-pc-desktop-terbaik-di-indonesia/](https://teknologi.info/2612213/rekomendasi-pc-desktop-terbaik-di-indonesia/)
 * If I check the database, the results are like this:
 * post_date = 2023-09-26 **11**:53:06 
   post_date_gmt = 2023-09-26 **03**:53:06
 * which is correct, because I set the time zone to **GMT+8**.
 * BUT, if you look at the schema structure, what this plugin takes is post_date_gmt
   so it becomes:
 * “datePublished”:”2023-09-26T**03**:53:06+08:00″
 * This is what causes every time I publish an article, every time Google indexes
   the article, it should only take a few minutes, but on Google or Google News 
   it can appear several hours ago.
 * Let’s take the example I just posted [https://teknologi.info/1412323/download-wallpaper-ekslusif-windows-insider-9-tahun/](https://teknologi.info/1412323/download-wallpaper-ekslusif-windows-insider-9-tahun/).
   Now, when I take this screenshot, it is currently 15:09 (GMT+8)
 * [https://prnt.sc/P_Duf3kDe52g](https://prnt.sc/P_Duf3kDe52g)
 * Pay attention to the description on Google News: 12 hours ago!
 * In fact, this article was posted at:
 * post_date = 2023-10-14 **10**:40:13 (My sitemap shows the correct hours)
   post_date_gmt
   = 2023-10-14 **02**:40:13
 * If your schema is correct, Google News should say 4 or 5 hours ago. But because
   the AIO schema takes it from post_date_gmt so it becomes 12 hours ago.
 * This also applies to dateModified
 * Or am I mistaken?
 * Thanks for your help
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fdatepublished-datemodified-schema-wrong%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Thread Starter [Jimmy Ahyari](https://wordpress.org/support/users/71mm0/)
 * (@71mm0)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/datepublished-datemodified-schema-wrong/#post-17124651)
 * For now, i edit manually all-in-one-seo-pack\app\Common\Schema\Graphs\Article\
   Article.php and change post_date_gmt to post_date and post_modified_gmt to post_modified
 * If you have any other solution, let me know. Thanks
 *  [MD. Sakib Khandaker](https://wordpress.org/support/users/numbnerd14/)
 * (@numbnerd14)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/datepublished-datemodified-schema-wrong/#post-17127981)
 * Hi [@71mm0](https://wordpress.org/support/users/71mm0/) ,
 * Thank you so much for getting in touch.
 * Although the URL you shared as an example is currently showing _3 days ago_ and
   no specific time on Google, which is normal.
 * However, since this is causing an issue for your site and, for this reason, wrong
   time is being shown on SERPs, you may modify the output of _datePublished_ and
   _dateModified_ properties on your site by modifying the below filter:
   [https://aioseo.com/docs/removing-published-date-from-article-schema/](https://aioseo.com/docs/removing-published-date-from-article-schema/)
 * I hope that helps! Let me know if you have any questions!
 *  Plugin Author [arnaudbroes](https://wordpress.org/support/users/arnaudbroes/)
 * (@arnaudbroes)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/datepublished-datemodified-schema-wrong/#post-17128008)
 * Hey [@71mm0](https://wordpress.org/support/users/71mm0/),
 * I’ll have to try this out and see if I can reproduce the issue. I will provide
   you with an update here shortly.
 *  Thread Starter [Jimmy Ahyari](https://wordpress.org/support/users/71mm0/)
 * (@71mm0)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/datepublished-datemodified-schema-wrong/#post-17134498)
 * Hi [@numbnerd14](https://wordpress.org/support/users/numbnerd14/),
 * The link you provided contains a way to “delete” it. Meanwhile I still want to
   use it. Is there a filter code that can change `post_date_gmt` to `post_date`
   and `post_modified_gmt` to `post_modified`.
 * Because by changing it directly in the file in the plugin (`all-in-one-seo-pack\
   app\Common\Schema\Graphs\Article\Article.php`), then I checked the schema validator,
   the contents now **match the date** I want.
 * But this way, if the plugin has an update, then my modifications in the live 
   file will be lost too. That’s why I need the code in the filter function.
 * Hi [@arnaudbroes](https://wordpress.org/support/users/arnaudbroes/)
 * Thank you for planning to execute this problem. I’m waiting for further information
   from you.
 * Thanks for your support, AIO Team 🙏
 *  Thread Starter [Jimmy Ahyari](https://wordpress.org/support/users/71mm0/)
 * (@71mm0)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/datepublished-datemodified-schema-wrong/#post-17134719)
 * This is my new post, publish at 19 Oct 2023 12:19 (in UTC+8). A few minutes later,
   i check google news [https://prnt.sc/nQ_FCS2LfkPc](https://prnt.sc/nQ_FCS2LfkPc)
   and this is correct. 3 minutes ago.
 * This is because i change post_date_gmt to post_date. If i stick with your post_date_gmt,
   google will show 8 hours ago.
 *  Plugin Author [arnaudbroes](https://wordpress.org/support/users/arnaudbroes/)
 * (@arnaudbroes)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/datepublished-datemodified-schema-wrong/#post-17137322)
 * Hey [@71mm0](https://wordpress.org/support/users/71mm0/),
 * I just had some time to look into this and confirmed it as a bug. I’ll make sure
   that we get it fixed in the next version, which is due in about a week and a 
   half.
 *  Plugin Support [Steve M](https://wordpress.org/support/users/wpsmort/)
 * (@wpsmort)
 * [2 years, 5 months ago](https://wordpress.org/support/topic/datepublished-datemodified-schema-wrong/#post-17294610)
 * Hi [@71mm0](https://wordpress.org/support/users/71mm0/),
 * I wanted to let you know that we released All in One SEO version 4.5.3.1 today
   which fixes this issue that you reported.
 * Please let us know if you’re still experiencing any issues and we’ll be happy
   to help you.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘datePublished & dateModified schema wrong’ is closed to new replies.

 * ![](https://ps.w.org/all-in-one-seo-pack/assets/icon.svg?rev=2443290)
 * [All in One SEO – Powerful SEO Plugin to Boost SEO Rankings & Increase Traffic](https://wordpress.org/plugins/all-in-one-seo-pack/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/all-in-one-seo-pack/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/all-in-one-seo-pack/)
 * [Active Topics](https://wordpress.org/support/plugin/all-in-one-seo-pack/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/all-in-one-seo-pack/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/all-in-one-seo-pack/reviews/)

## Tags

 * [datePublished](https://wordpress.org/support/topic-tag/datepublished/)

 * 7 replies
 * 4 participants
 * Last reply from: [Steve M](https://wordpress.org/support/users/wpsmort/)
 * Last activity: [2 years, 5 months ago](https://wordpress.org/support/topic/datepublished-datemodified-schema-wrong/#post-17294610)
 * Status: resolved