Set timezone and plugin conflict
-
You must be setting the timezone to something unexpected, as this is causing a conflict with another plugin (My Calendar). It is showing a current date with different color and in my case that happens two hours too early.
Most likely you are setting timezone based on my location EET (Helsinki/Europe or UTC +2) which you should not do. This behaviour has been tested and is definetely because of Feed Them Social. If I add a setting before the other plugin placed in footer ( date_default_timezone_set( ‘Etc/UTC’ ); ), it works as expected.
Some testing – Real time in Helsinki, EET is 22:56:24 but now it is messed up, in pages your plugin (widget) is in use WordPress thinks the above is UTC time, which adds two hours extra. Below what my installation prints out:
$now = current_time( ‘timestamp’ ): 1520895384
Using date( “Ymd”, $now ): 20180313
Using date( “D M j G:i:s T Y”, $now ): Tue Mar 13 0:56:24 EET 2018
Using date_i18n( “Ymd”, $now ): 20180313
Using date_i18n( “D M j G:i:s T Y”, $now): ti maalis 13 0:56:24 EET 2018From WordPress settings:
Timezone format: Y-m-d H:i:s
Offset: 2
Timezone string: Europe/Helsinki
Date format: j.n.YTime using timezone_format!
UTC – date_i18n( $timezone_format, false, true ): 2018-03-12 22:56:24
EET – date_i18n( $timezone_format ): 2018-03-13 00:56:24
The topic ‘Set timezone and plugin conflict’ is closed to new replies.