[wp-trac] [WordPress Trac] #48733: Problems with date after replacing date_i18n() with wp_date()
WordPress Trac
noreply at wordpress.org
Wed Nov 20 22:19:19 UTC 2019
#48733: Problems with date after replacing date_i18n() with wp_date()
---------------------------+----------------------
Reporter: Guido07111975 | Owner: (none)
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: Date/Time | Version: 5.3
Severity: normal | Resolution: invalid
Keywords: | Focuses:
---------------------------+----------------------
Comment (by Guido07111975):
Hi,
Thanks for your response.
Meanwhile I created a thread at support forum:
https://wordpress.org/support/topic/problems-with-timezone-when-using-new-
function-wp_date
And solved my problem by adding the timezone as third parameter:
{{{#!php
$zone = new DateTimeZone('UTC');
wp_date( $dateformat, esc_attr( $date ), $zone )
}}}
Guido
--
Ticket URL: <https://core.trac.wordpress.org/ticket/48733#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list