Title: Ongoing issue with timezone error
Last modified: May 15, 2022

---

# Ongoing issue with timezone error

 *  [pablopaul](https://wordpress.org/support/users/pablopaul/)
 * (@pablopaul)
 * [4 years ago](https://wordpress.org/support/topic/ongoing-issue-with-timezone-error/)
 * Last year, I began doing some work on a website which uses the Events Calendar
   WD plugin, and we have always been getting the following critical error on the
   WP Site Health page:
 * > **PHP default timezone is invalid**
   > 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.
 * In another [support thread](https://wordpress.org/support/topic/event-calendar-wrong-date-time-displayed/)
   for this plugin, the Plugin Author writes that this plugin doesn’t use the date_default_timezone_set()
   function. However, when I searched through the latest version of the plugin code,
   I found it is in fact being called in the plugin’s ecwd_class.php file, at line
   149:
 *     ```
       if(!empty($timezone)) {
           date_default_timezone_set($timezone);
       }
       ```
   
 * Are there any plans to replace this with some other function which won’t create
   this critical error? So far, we haven’t seen any time discrepancies between our
   entries and what appears on the calendar, but it still concerns me as it is showing
   as a critical error.
 * Thanks in advance for your help.

The topic ‘Ongoing issue with timezone error’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/event-calendar-wd_a3bef6.svg)
 * [EventCalendar](https://wordpress.org/plugins/event-calendar-wd/)
 * [Support Threads](https://wordpress.org/support/plugin/event-calendar-wd/)
 * [Active Topics](https://wordpress.org/support/plugin/event-calendar-wd/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/event-calendar-wd/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/event-calendar-wd/reviews/)

## Tags

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

 * 0 replies
 * 1 participant
 * Last reply from: [pablopaul](https://wordpress.org/support/users/pablopaul/)
 * Last activity: [4 years ago](https://wordpress.org/support/topic/ongoing-issue-with-timezone-error/)
 * Status: not resolved