• Resolved Viktor

    (@viktorsilfverhgmailcom)


    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.

    https://www.ads-software.com/extend/plugins/events-manager/

Viewing 14 replies - 1 through 14 (of 14 total)
  • 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

    Thread Starter Viktor

    (@viktorsilfverhgmailcom)

    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.

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    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
    Thread Starter Viktor

    (@viktorsilfverhgmailcom)

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

    Thread Starter Viktor

    (@viktorsilfverhgmailcom)

    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?

    Thread Starter Viktor

    (@viktorsilfverhgmailcom)

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

    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.

    Thread Starter Viktor

    (@viktorsilfverhgmailcom)

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

    Thread Starter Viktor

    (@viktorsilfverhgmailcom)

    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.

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    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.

    Thread Starter Viktor

    (@viktorsilfverhgmailcom)

    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.

    Thread Starter Viktor

    (@viktorsilfverhgmailcom)

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

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    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.

    Plugin Author Marcus (aka @msykes)

    (@netweblogic)

    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.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘iCal is off by one hour’ is closed to new replies.