Support » Plugin: WooCommerce » Woocommerce not using site time and date

  • Resolved liberius


    My time zone is Auckland, New Zealand. Both Woocommerce and WordPress are correctly set to this time zone.

    The server is based in California which is 21 hours behind.

    I’ve confirmed that WordPress is using the correct local time zone as a call to the current_time function outputs the correct local time in Auckland and not in California.

    But when I set a sale price start date in Woocommerce, it seems to be using the server time. I’ve confirmed this by changing the sale price start date to one day earlier and sure enough the sale price is now active.

    Is this a bug in Woocommerce or am I missing something?

    Thanks in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • vark


    I believe you can repair the situation by placing something like the following in your theme’s functions.php file:

    add_action( 'init', create_function( '', "date_default_timezone_set('Pacific/Auckland');" ) );

    Untested, ymmv.




    It’s the strangest thing. About an hour after I confirmed both timezone settings things finally sorted themselves out. Woocommerce now sees the timezone correctly.

    Perhaps that will help others. Wait a while and see if you just don’t have a delay.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Woocommerce not using site time and date’ is closed to new replies.