Title: Setting default timezone
Last modified: August 22, 2016

---

# Setting default timezone

 *  Resolved [stevestaso](https://wordpress.org/support/users/stevestaso/)
 * (@stevestaso)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/setting-default-timezone/)
 * I really like WP-Statistics. However, it is causing a conflict with another plugin
   called Event Espresso. I’ve asked them about it and here is their response. Seems
   valid. Can you provide a patch/fix? Thank you:
 * —
 * date_default_timezone_set() may well be a commonly used function within PHP, 
   however using it within WordPress is discouraged.
 * Here are the links to explain:
 * [http://vip.wordpress.com/documentation/use-current_time-not-date_default_timezone_set/](http://vip.wordpress.com/documentation/use-current_time-not-date_default_timezone_set/)
 * [http://weston.ruter.net/2013/04/02/do-not-change-the-default-timezone-from-utc-in-wordpress/](http://weston.ruter.net/2013/04/02/do-not-change-the-default-timezone-from-utc-in-wordpress/)
 * As far as I know, WordPress expects the default timezone to be UTC. Within wp-
   settings.php WordPress does the same thing but sets the timezone to UTC:
 * date_default_timezone_set( ‘UTC’ );
 * [http://take.ms/8RxDU](http://take.ms/8RxDU)
 * All times/dates are then calculated based on UTC and the offset is calculated
   based on the timezone you set within WP settings.
 * Setting the default timezone to a timezone other than UTC will have unexpected
   results with not just Event Espresso but any plugin that correctly uses date 
   and times within WordPress. It is more evident within Event Espresso than some
   other plugins due to the fact that everything revolves around dates.
 * [https://wordpress.org/plugins/wp-statistics/](https://wordpress.org/plugins/wp-statistics/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Contributor [Greg Ross](https://wordpress.org/support/users/gregross/)
 * (@gregross)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/setting-default-timezone/#post-5834941)
 * This is the first I’ve heard of an issue with this, and it’s not an easy thing
   to fix as even some of the external libraries we use set it.
 * I’ll take a look, but I doubt it will change any time soon.
 *  Plugin Contributor [Greg Ross](https://wordpress.org/support/users/gregross/)
 * (@gregross)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/setting-default-timezone/#post-5835168)
 * I’ve made an update so the next release will no longer use date_default_timezone_set()
   to deal with the timezone.
 *  Thread Starter [stevestaso](https://wordpress.org/support/users/stevestaso/)
 * (@stevestaso)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/setting-default-timezone/#post-5835233)
 * I just tested WP-Statistics 9.0 and it no longer causes a conflict with my other
   plugin. Thank You!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Setting default timezone’ is closed to new replies.

 * ![](https://ps.w.org/wp-statistics/assets/icon.svg?rev=3081064)
 * [WP Statistics – Simple, privacy-friendly Google Analytics alternative](https://wordpress.org/plugins/wp-statistics/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-statistics/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-statistics/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-statistics/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-statistics/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-statistics/reviews/)

## Tags

 * [date_default_timezone_set](https://wordpress.org/support/topic-tag/date_default_timezone_set/)

 * 3 replies
 * 2 participants
 * Last reply from: [stevestaso](https://wordpress.org/support/users/stevestaso/)
 * Last activity: [11 years, 2 months ago](https://wordpress.org/support/topic/setting-default-timezone/#post-5835233)
 * Status: resolved