Title: Plugin should not change the PHP timezone
Last modified: August 21, 2016

---

# Plugin should not change the PHP timezone

 *  Resolved [Emberstrife](https://wordpress.org/support/users/emberstrife/)
 * (@emberstrife)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/plugin-should-not-change-the-php-timezone/)
 * Good time of day,
 * I couldn’t find a bug tracker for the plugin, so I’ll post this here.
 * Google Analyticator sets the PHP timezone to UTC if ini_get(‘date.timezone’) 
   fails (line 29 of google-api-php-client/src/Google_Client.php). And ini_get isn’t
   very reliable (for example, if you run hhvm).
 * This can cause issues if the end user has a plugin that sets a custom PHP timezone(
   to work around issues with date.timezone in hhvm or for whatever other reason).
 * WordPress already sets the default timezone to UTC on init (in wp-settings.php),
   so unless a user plugin deliberately overrides it, you can expect it to be UTC.
   If the user deliberately overrides the timezone in a plugin, I think it’s safe
   to expect that to be the server’s timezone, too.
 * At the moment we have to patch the timezone override out of Google Analyticator
   after every upgrade, which is a bit tedious. Any chance the plugin could be updated
   to fix this?
 * [https://wordpress.org/plugins/google-analyticator/](https://wordpress.org/plugins/google-analyticator/)

Viewing 1 replies (of 1 total)

 *  [Video User Manuals](https://wordpress.org/support/users/videousermanuals/)
 * (@videousermanuals)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/plugin-should-not-change-the-php-timezone/#post-4618678)
 * Hi,
 * This was put in place a long time ago, and I believe the original reason was 
   so that the google API server timezone to matches with the google server. However
   this might not be the case anymore.
 * We will investigate if this is necessary, but as you can imagine it will involve
   a lot of testing, so I don’t think the change will be in the next update.
 * Thanks

Viewing 1 replies (of 1 total)

The topic ‘Plugin should not change the PHP timezone’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/google-analyticator_fefefe.svg)
 * [Analyticator](https://wordpress.org/plugins/google-analyticator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/google-analyticator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/google-analyticator/)
 * [Active Topics](https://wordpress.org/support/plugin/google-analyticator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/google-analyticator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/google-analyticator/reviews/)

## Tags

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

 * 1 reply
 * 2 participants
 * Last reply from: [Video User Manuals](https://wordpress.org/support/users/videousermanuals/)
 * Last activity: [12 years, 3 months ago](https://wordpress.org/support/topic/plugin-should-not-change-the-php-timezone/#post-4618678)
 * Status: resolved