Title: PHP Timezone is Invalid
Last modified: May 5, 2020

---

# PHP Timezone is Invalid

 *  [Zanzara](https://wordpress.org/support/users/zanzara/)
 * (@zanzara)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/php-timezone-is-invalid/)
 * I’m getting this message in my WordPress Site Health page.
    “PHP default timezone
   was changed after WordPress loading by a date_default_timezone_set() function
   call. This interferes with correct calculations of dates and times.”
 * It seems to be coming form the Ultimate Auction Pro plugin.
 * How can I fix this?
    Wordpress version 5.4.1 PHP version 7.3.17

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/php-timezone-is-invalid/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/php-timezone-is-invalid/page/2/?output_format=md)

 *  [jjk697](https://wordpress.org/support/users/jjk697/)
 * (@jjk697)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/php-timezone-is-invalid/#post-12800113)
 * Same problem.
 * `PHP default timezone was changed after WordPress loading by a date_default_timezone_set()
   function call. This interferes with correct calculations of dates and times.`
 *  Plugin Author [Nitesh](https://wordpress.org/support/users/nitesh_singh/)
 * (@nitesh_singh)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/php-timezone-is-invalid/#post-12802404)
 * Hi [@zanzara](https://wordpress.org/support/users/zanzara/) ,
 * You had mentioned that you are using “Ultimate Auction Pro Plugin”. Could you
   please share below:
 * 1. Full plugin name
 * 2. Plugin version.
 * We doubt that you are using an old plugin and that too a pro version which we
   do not support any more.
 * [@jjk697](https://wordpress.org/support/users/jjk697/) ,
 * Could you please share below information:
 * 1. Could you please share system information: PHP Version, WP Version, Mysql 
   version and plugin name and its version.
 * 2. Where do you see this message? Kindly share the steps to reproduce it
 * Regards,
 *  Thread Starter [Zanzara](https://wordpress.org/support/users/zanzara/)
 * (@zanzara)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/php-timezone-is-invalid/#post-12816461)
 * Hi Nitesh,
    The name of the plugin is: Ultimate Auction Pro Awesome plugin to
   host auctions on your wordpress site and sell anything you want. Version 7.0.9
   | By Nitesh Singh | Visit plugin site
 *  [hrsms](https://wordpress.org/support/users/hrsms/)
 * (@hrsms)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/php-timezone-is-invalid/#post-12846459)
 * Hello Nitesh,
 * I am having the same problem. WordPress reports this as a critical error when
   your plugin is active, and it stops reporting it when deactivated. It is certainly
   this plugin and not another.
 * “PHP default timezone was changed after WordPress loading by a date_default_timezone_set()
   function call. This interferes with correct calculations of dates and times.”
 * Ultimate WordPress Auction Plugin
    Version 4.0.6
 * Thanks,
    Greg
 *  [jgysenbergs](https://wordpress.org/support/users/jgysenbergs/)
 * (@jgysenbergs)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/php-timezone-is-invalid/#post-13116484)
 * Does this break something after setting correct time zone?
 *  [ulf_g](https://wordpress.org/support/users/ulf_g/)
 * (@ulf_g)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/php-timezone-is-invalid/#post-13629238)
 * I have the same, or similar, experience. This plugin interferes with my My Calendar
   plugin and changes all the times.
 * So, a temporary workaround is to set the timezone for the ultimate auction plugin
   to the London timezone (even though I live in Sweden). This will adjust the times
   in the calendar to the correct start- and end time.
 * However, this will also have an impact on the start- and end times when adding
   a new auction. If I set the end time to 1 PM (13:00) – now it’s 12:24 – it will
   say that the auction ends in 1 hr and 35 minutes.
 * I’m not really sure what’s my best option here.
 *  [harlointeractive](https://wordpress.org/support/users/harlointeractive/)
 * (@harlointeractive)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/php-timezone-is-invalid/#post-14009782)
 * We have the same issue. This error message shows up as a “critical issue” under
   the wordpress site health area so you should resolve it. Can’t you configure 
   the plugin to use the same time zone that is set by the user under the wp general
   settings? why would you try to set your own timezone here? just use the wordpress
   general setting for this or at least give the admin the option so we can fix 
   this.
 * Using WP 5.6.1, Ultimate Auction 4.0.8
 *  [jeff41](https://wordpress.org/support/users/jeff41/)
 * (@jeff41)
 * [5 years ago](https://wordpress.org/support/topic/php-timezone-is-invalid/#post-14290014)
 * I am having the same problem. Is there a workaround for this?
 *  [jeff41](https://wordpress.org/support/users/jeff41/)
 * (@jeff41)
 * [5 years ago](https://wordpress.org/support/topic/php-timezone-is-invalid/#post-14294438)
 * The problem appears to be the use of the date_default_timezone_set() function
   which WordPress heavily recommends against using because it causes so many problems.
   That was from the developer with another plugin the auction plugin caused problems
   in. According to them the timezone needs to be UTC.
 * I commented out the function in the ultimate-auction.php module and the php error
   code went away. This meant the countdown is now 7 hours out of date though as
   London time is 7 hours ahead.
 * Is there a more permanent fix for this? I like the plugin. It’s exactly what 
   I need and well thought out.
 *  [mikeyed](https://wordpress.org/support/users/mikeyed/)
 * (@mikeyed)
 * [4 years, 12 months ago](https://wordpress.org/support/topic/php-timezone-is-invalid/#post-14310250)
 * I am having the same problem and I did design a plugin that has
    date_default_timezone_set(‘
   America/Los_Angeles’); in it. Because WordPress is way too confused over timezones
   and I had to correct it. Without that code, here is what happens.
 * When I go to dashboard -> settings -> general it shows the proper UTC time and
   the proper Local time yet it uses the UTC time as the default. I want to use 
   local time and wordpress refuses so I forced the default timezone.
 *  [traings](https://wordpress.org/support/users/traings/)
 * (@traings)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/php-timezone-is-invalid/#post-14463174)
 * Hi,
    I am having the same problem and used the fix suggested by [@jeff41](https://wordpress.org/support/users/jeff41/)
   The problem is certainly having to compensate for the difference between UTC 
   and local time manually. I see this problem started one year ago. Did anyone 
   found a definite solution? Regards
 *  [ulf_g](https://wordpress.org/support/users/ulf_g/)
 * (@ulf_g)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/php-timezone-is-invalid/#post-14463281)
 * I think it would be awesome if [@nitesh_singh](https://wordpress.org/support/users/nitesh_singh/)
   himself could share some insights or solutions to this 1-year old issue
 *  [mikeyed](https://wordpress.org/support/users/mikeyed/)
 * (@mikeyed)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/php-timezone-is-invalid/#post-14463354)
 * I used the solution here and it worked great for me.
    [https://developer.wordpress.org/reference/functions/current_time/](https://developer.wordpress.org/reference/functions/current_time/)
 *  [Trisha Johnson](https://wordpress.org/support/users/atomicdrivex/)
 * (@atomicdrivex)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/php-timezone-is-invalid/#post-14913714)
 * Guys, update the on/around line 608 of ultimate-auction.php to this:
 *     ```
       add_action('init', 'wdm_set_auction_timezone');
       function wdm_set_auction_timezone()
       {
           $get_default_timezone = get_option('wdm_time_zone');
       	$timezone_string = get_option( 'timezone_string' );
   
           if(!empty($get_default_timezone))
           {
               return $timezone_string;
           }
       ```
   
 * It will solve your issues.
 *  [ulf_g](https://wordpress.org/support/users/ulf_g/)
 * (@ulf_g)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/php-timezone-is-invalid/#post-14913777)
 * Well whaddoyouknow.
    That actually seems to be working. Hats off to Trisha.

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/php-timezone-is-invalid/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/php-timezone-is-invalid/page/2/?output_format=md)

The topic ‘PHP Timezone is Invalid’ is closed to new replies.

 * ![](https://ps.w.org/ultimate-auction/assets/icon-128x128.png?rev=1494738)
 * [Ultimate Wordpress Auction Plugin](https://wordpress.org/plugins/ultimate-auction/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ultimate-auction/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ultimate-auction/)
 * [Active Topics](https://wordpress.org/support/plugin/ultimate-auction/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ultimate-auction/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ultimate-auction/reviews/)

## Tags

 * [invalid](https://wordpress.org/support/topic-tag/invalid/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [plugin interference](https://wordpress.org/support/topic-tag/plugin-interference/)
 * [timezone](https://wordpress.org/support/topic-tag/timezone/)

 * 16 replies
 * 12 participants
 * Last reply from: [payalrajyaguru](https://wordpress.org/support/users/payalrajyaguru/)
 * Last activity: [4 years, 6 months ago](https://wordpress.org/support/topic/php-timezone-is-invalid/page/2/#post-14934010)
 * Status: not resolved