Title: Timezone is wrong
Last modified: August 21, 2016

---

# Timezone is wrong

 *  Resolved [Rick](https://wordpress.org/support/users/murlyn/)
 * (@murlyn)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/timezone-is-wrong/)
 * You have a problem in your adrotate_date_start function, it leaves the website
   timezone as UTC instead of what it is set in WordPress. So any widget/plugin 
   etc that is fired after your plugin will result in the timezone being wrong.
 * So to fix this at the end of the widget function I added this to return the site
   back to the proper timezone.
 * $timezone = get_option(‘timezone_string’);
    if($timezone) date_default_timezone_set(
   $timezone);
 * [https://wordpress.org/plugins/adrotate/](https://wordpress.org/plugins/adrotate/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Arnan](https://wordpress.org/support/users/adegans/)
 * (@adegans)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/timezone-is-wrong/#post-4812039)
 * Hmm yes, the code assumes UTC for everyone… Silly
 * I’ll fix that for the next version.

Viewing 1 replies (of 1 total)

The topic ‘Timezone is wrong’ is closed to new replies.

 * ![](https://ps.w.org/adrotate/assets/icon-256x256.gif?rev=3117289)
 * [AdRotate Banner Manager](https://wordpress.org/plugins/adrotate/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/adrotate/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/adrotate/)
 * [Active Topics](https://wordpress.org/support/plugin/adrotate/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/adrotate/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/adrotate/reviews/)

## Tags

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

 * 1 reply
 * 2 participants
 * Last reply from: [Arnan](https://wordpress.org/support/users/adegans/)
 * Last activity: [12 years, 1 month ago](https://wordpress.org/support/topic/timezone-is-wrong/#post-4812039)
 * Status: resolved