How to fix timezone issue.
-
The Author seems to have given up on this plugin, so I’ll put my solution in case it helps others.
Open the main plugin file /wp-content/plugins/wp-countdown-timer/wordpress-countdown-timer.php
Replace the lines 69-76 with the following :
(remember to use your own timezone)function countdown_timer_shortcode(){ // Set this to your timezone: // https://php.net/manual/en/timezones.php date_default_timezone_set('Australia/Brisbane'); $date_to = get_option('countdown-timer-date'); $date_from = date('m/d/Y h:i:s'); //echo $date_from.""; //echo $date_to;die; $date_to = new DateTime($date_to); $date_from = new DateTime(); $date_diff = $date_from->diff($date_to,false);
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘How to fix timezone issue.’ is closed to new replies.