Hello,
I apologize for the inconvenience you are facing with the upload date of the video not reflecting the correct time according to the India time zone. To resolve this issue, you can follow these steps:
- Update the Upload Date with Timezone Information: You can add a filter to your theme’s
rank-math.php
file to ensure that the UploadDate
Schema property includes the correct timezone information. Here is the code snippet you can use:
/**
* Filter code to add time & timezone in existing Video Schema
*/
add_filter( 'rank_math/snippet/rich_snippet_videoobject_entity', function( $entity ) {
if ( empty( $entity['uploadDate'] ) ) {
return $entity;
}
$parts = explode( 'T', $entity['uploadDate'] );
if ( ! empty( $parts[ 1 ] ) ) {
return $entity;
}
$entity['uploadDate'] = wp_date( 'Y-m-dTH:i:sP', strtotime( $entity['uploadDate'] ) );
return $entity;
} );
- Check Timezone Settings: Ensure that your WordPress site’s timezone settings are correctly configured to reflect the India time zone. You can adjust this in your WordPress admin under Settings > General.
By following these steps, you should be able to update the upload date of the video with the correct time according to the India time zone.
If you need further assistance or have any other questions, feel free to ask.
Thank you for reaching out!
Sources:
Resolving Rank Math Schema Markup Related Issues
How to Auto-Detect & Auto-Fetch Video Data for Video Schema and Sitemap » Rank Math
Video Schema Type » Rank Math
How to Change the Date & Time on Your Posts/Pages » Rank Math
Hello,
Thank you for contacting Rank Math support.
Please share the URL of the affected post so we can check and assist you further.
Looking forward to helping you.
Hello,
It seems that you have missed my colleague’s reply above.
Please share the affected URL so we can check the issue further. You can add it to the sensitive data section by editing your first post
It is completely secure, and only our support staff has access to that section.
Looking forward to helping you.
Hello,
Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.
If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.
Thank you.