Upgrade caused Event Calendar Pro events to shift one hour

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
6/8/2010 10:01:52 PM
Gravatar
Total Posts 39

Upgrade caused Event Calendar Pro events to shift one hour

I just upgraded to mojoPortal 2.3.4.4 and Event Calendar Pro 0.0.2.8.

After the upgrade, all of my Event Calendar Pro events which were on days where Daylight Savings Time is in effect were shifted ahead one hour. (as a side effect, all day events that were one day now span two days)

I'm not sure which upgrade caused the issue, since I upgraded Event Calendar pro immediately after upgrading mojoPortal.

This is on a hosted Windows account with SQL Server 2008.

6/8/2010 11:19:33 PM
Gravatar
Total Posts 2239

Re: Upgrade caused Event Calendar Pro events to shift one hour

Hi Kevin,

Make sure you have the proper time zone set in your Site Settings, user profile and event calendar pro settings.

The last couple updates to mojoPortal have included some major enhancements to the Time Zone facilities so you could be seeing a few different issues. Rest assured that the actual data in the database for your events is okay as all dates are stored in UTC so what is shown to the user is the UTC +/- the Time Zone Offset.

HTH,
Joe D.

6/9/2010 5:30:13 AM
Gravatar
Total Posts 18439

Re: Upgrade caused Event Calendar Pro events to shift one hour

Hi Kevin,

Joe is correct that a major improvement was made to Event Calendar Pro in that it now correctly adjusts automatically to daylight savings.

However, it does pose a problem for events that were entered before the new timezone handling was implemented and unfortunately the only way to fix it is to correct the dates on the affected events.

Dates entered from the UI as local time and adjusted to UTC and stored in the database and then adjusted back to local time in the UI, the problem is that the UTC times stored under the old system were incorrect if you created dates during standard time for dates that occur during daylight savings time. Previously we only had a hard coded offset whereas now we take into account the correct offset for each date and it is adjusted correctly for daylight savings.

So for example take Eastern Time Zone, it has a 5 hour offset during standard time and a 4 hour offset during daylight savings. In the old system the offset did not adjust so it was always using the hard coded 5 hour amount and this would make events you entered into the system during daylight savings incorrect unless you adjusted the offset manually during daylight savings. If you entered dates during standard time but the dates occurred during daylight savings, the 5 hour offset was used to calculate the UTC time to store in the database, whereas in the new system it would adjust correctly by 4 hours when calculating the utc to store in the database. The problem is that old events were entered with an incorrect 5 hour offset and now it is still adjusting them for display using the 4 hour daylight savings offset. So the only way to solve it is to correct it on the events and this will make it calculate the correct utc date.

Sorry, I know this can be a hassle if you have a lot of dates entered already, but it will be correct now going forward and you would have encountered other date adjustment problems during daylight savings under the old system.

Best,

Joe

6/9/2010 11:03:06 AM
Gravatar
Total Posts 39

Re: Upgrade caused Event Calendar Pro events to shift one hour

Thanks for the info Joe. It's good to know this is an improvement going forward. The only suggestion I would make is that it would have been nice if this had been noted in the release notes.

Regards,

Kevin

6/9/2010 11:20:02 AM
Gravatar
Total Posts 18439

Re: Upgrade caused Event Calendar Pro events to shift one hour

Hi Kevin,

You are right I should have, I did mention the new TimeZone system in the 0.0.2.7 release notes, but I should have mentioned that existing events may need to be corrected, I just didn't think of it at the time. Luckily this kind of change is a rare thing.

Thanks for being understanding about it and thanks for the beer you just sent me!

Cheers,

Joe

You must sign in to post in the forums. This thread is closed to new posts.