Problems with timezone when using new function wp_date()
-
Hi,
Because of the new function wp_date() I have updated the date fields of my events plugin, but run into a timezone problem. In some cases the wrong day is being returned. Depending on the timezone.
I simply replaced all occurences of
date_i18n()
withwp_date()
. Example:
This:date_i18n( $dateformat, esc_attr( $date ) )
Became this:
wp_date( $dateformat, esc_attr( $date ) )
But I now notice there’s a third parameter, called $timezone, so I thought adding the default value
null
fixes my problem. But no change, becausenull
seems to be the PHPtime()
.Who can tell me how to fix this? No timezone should be added when outputting the date.
Guido
ps. I initially thought it was a Core issue, so have already created a ticket at Make Core, but apparently I’m doing it wrong, so ticket is closed.
- The topic ‘Problems with timezone when using new function wp_date()’ is closed to new replies.