WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[resolved] iCal is off by one hour (15 posts)

  1. Viktor
    Member
    Posted 1 year ago #

    Hi,

    Thanks for a great plugin.

    The iCal generated by the plugin on our site is always one hour late, even though WordPress is set to the correct time zone (Stockholm). I checked with the host and the server time is correct and WordPress handles time and time stamps accordingly to the time zone.

    This is for an event that starts at 08.00 and ends 10.00:

    BEGIN:VCALENDAR
    VERSION:2.0
    METHOD:PUBLISH
    CALSCALE:GREGORIAN
    PRODID:-//Events Manager//1.0//EN

    BEGIN:VEVENT
    UID:2ee9f931-aec4-4d91-8d8c-8f59a9f03c05
    DTSTART:20130208T090000Z
    DTEND:20130208T110000Z
    DTSTAMP:20130129T110621Z
    SUMMARY: [Title of the event removed] 2013-02-08 kl. 09:00 - 11:00
    LOCATION:Malmö
    URL: [URL removed]
    END:VEVENT
    END:VCALENDAR

    Even worse is, if I pull up a iCal-booking in Outlook, the summary/subject line is ONE hour off, but the actual time stamp that it puts in the calendar is TWO hours off.

    How do we go in solving this?

    We run version 5.3.2.1.

    http://wordpress.org/extend/plugins/events-manager/

  2. agelonwl
    Member
    Posted 1 year ago #

    hi,

    Did you check your server DST? also, have you tried the latest EM version 5.3.5 or dev version 5.3.5.1

  3. Viktor
    Member
    Posted 1 year ago #

    Hello,

    No, how should i check the DST? What am I supposed to be looking at, and where?

    Also, no, I haven't installed the latest versions - they don't list any updates regarding time or iCal, and I am somewhat hesitant to update plugins if it's not really, really necessary - we run lots of plugins in our site and updating sometimes make things worse.

  4. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    if your wp blog settings are correct then this this is probably server related.

    try deleting the first three lines in templates/templates/ical.php and ical-event.php

    //timezone
    $tz = date_default_timezone_get(); // get current PHP timezone
    date_default_timezone_set( get_option('timezone_string')); // set the PHP timezone to match WordPress
  5. Viktor
    Member
    Posted 1 year ago #

    I deleted the lines, made a new test event, but its still off. The time stamp by one hour and the summary by two.

  6. Viktor
    Member
    Posted 1 year ago #

    UPDATE: Sorry, I happened to just delete the lines from ical.php and not also ical-event.php.

    Having removed the lines from both now I actually get a correct time stamp(!) AND the summary is right.

    However, when I open it in Calendar or Outlook, it puts the event down on one hour off - any ideas why this happens?

  7. Viktor
    Member
    Posted 1 year ago #

    Also, should the iCal script also not include some kind of time zone parameter?

  8. agelonwl
    Member
    Posted 1 year ago #

    Can I know what’s your timezone in Outlook?

    e.g. if your site is set to GMT but your Outlook is set to CET, then it would show you the event an hour ahead in your time.

  9. Viktor
    Member
    Posted 1 year ago #

    Both site and Outlook is set to UTC+01:00

  10. Viktor
    Member
    Posted 1 year ago #

    It must have something to do with day light saving. Our events happening around this time is off by one hour, but events taking place i May are off two hours, and this shows only when the iCal is opened in the calendar. The timestamps in the file is correct.

  11. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    I think this is a specific server problem, because those lines actually fixed the problem for the vast majority of people.

    the daylight savings problem isn't the issue because it sounds like the amount of time offset in/out of DST is correct, just the initial offset is wrong.

  12. Viktor
    Member
    Posted 1 year ago #

    Marcus,

    Removing those lines fixed the timestamp, but not the calibration towards any software that uses iCal, where they are all one hour late. Do you suggest that the server should generate the timestamp with one hour offset and this is what's not happening?

    What is strange though is that WordPress behaves correct in all other matters of time.

  13. Viktor
    Member
    Posted 1 year ago #

    Also I get this exact problem locally on my computer using MAMP.

  14. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    we've reworked the ical a few times already last year to fix issues like this. I'll have another look and get back to you asap and see if I can reproduce this, but will need a few days at least.

  15. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    I've rewritten some of the stuff on the ical to use WP internal functions to calculate DST offsets, can you try the latest dev version? It seems to have fixed the problem for some users.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.