Support

Home Forums Community Forum Changes to date times do not stick

Changes to date times do not stick

Posted: February 23, 2015 at 6:20 pm


stevestaso

February 23, 2015 at 6:20 pm

I have the same problem addressed in these topics:
(when resaving/updating an event, the dates of both the Event tickets and datetimes change by 7 hours each time I resave the event)

https://www.google.com/url?q=http://eventespresso.com/topic/time-changes-not-staying-after-update/&sa=U&ei=TpzpVPj1KMOZyATRhYHoCg&ved=0CAYQFjAA&client=internal-uds-cse&usg=AFQjCNH19w0TmptRRKmL5A9LU5ShfsUk6w
AND
https://www.google.com/url?q=http://eventespresso.com/topic/changes-to-date-times-do-not-stick/&sa=U&ei=TpzpVPj1KMOZyATRhYHoCg&ved=0CAgQFjAB&client=internal-uds-cse&usg=AFQjCNEgHU7t7ZwQR5Ss_p5uc6mMUZnJZA

I found my conflicting plugin to be WP-Statistics
I contacted the developers of this plugin and they say:

I would suggest you talk to the other plugin developer,
date_default_timezone_set() is a commonly used function and they should not have an issue with us using it.

So what shall I do?

Thanks in advance.


Tony

  • Support Staff

February 24, 2015 at 10:39 am

Hi Stevestaso,

date_default_timezone_set() may well be a commonly used function within PHP, however using it within WordPress is discouraged.

Here are the links I provided in my previous reply that you linked to:

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/

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

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.

The support post ‘Changes to date times do not stick’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

If you would like help from the Event Espresso staff, then please purchase a support license right now so you can create a support topic in our premium support forums.

Status: closed

Updated by  Tony 4 years, 5 months ago ago

Topic Tags

Tagged: 

Notifications

This topic is: not resolved
Do NOT follow this link or you will be banned from the site!