Skip to content

Commit

Permalink
updated date format to d-m-y
Browse files Browse the repository at this point in the history
  • Loading branch information
Akshay Urankar authored and Akshay Urankar committed Nov 18, 2024
1 parent 5c103f7 commit 70537d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@ function display_rich_snippet( $content ) {
try {
// Create a DateTime object from the $video_date string.
$datetime = new DateTime( $video_date, new DateTimeZone( $timezone ) ); // Set the timezone to the server's timezone.
$uploadDate = $datetime->format( 'Y-m-d\TH:i:sP' ); // phpcs:ignore WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
$uploadDate = $datetime->format( 'd-m-Y\TH:i:sP' ); // phpcs:ignore WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase
} catch ( Exception $e ) {
// Translators: %s is the error message from the exception.
echo esc_html( sprintf( __( 'Error creating DateTime object: %s', 'all-in-one-schemaorg-rich-snippets' ), esc_html( $e->getMessage() ) ) );
Expand Down

0 comments on commit 70537d4

Please sign in to comment.