WordPress.org

Ready to get started?Download WordPress

Forums

amr ical events lists
Time Zone bug with TZID US/Eastern (7 posts)

  1. Peter Baylies
    Member
    Posted 2 years ago #

    I'm running into a bug where the TZID of US/Eastern is being detected as Europe/London. This is just an FYI; I hacked around it to use America/New_York instead.

    http://wordpress.org/extend/plugins/amr-ical-events-list/

  2. anmari
    Member
    Plugin Author

    Posted 2 years ago #

    Hi Peter

    Is this in picking it up from an ics file ?
    Please tell me who the ics publisher is (eg google ?) and post the ics link - I need to see what text / format is being used.

    Also is your WordPress timezone set - see your WordPress general settings .

    I'd appreciate you posting back in case it's a new format the plugin should cope with. Also then you can stay in the upgrade path rather than hacking it.

    Regards anmari

  3. Peter Baylies
    Member
    Posted 2 years ago #

    anmari,

    It was coming from a TZID set on an individual entry, skewing the time for that entry by 5 hours; yes, timezone was set in WordPress, everything else working fine otherwise; I'll put together some more details for you when I'm back at work.

  4. anmari
    Member
    Plugin Author

    Posted 2 years ago #

    Hmm, yes please send the ics link.

    For the record, http://www.php.net/manual/en/timezones.others.php
    US/Eastern is not supposed to be used anymore (according to php and I think in the Olson DB.) America/New_York is the equivalent, although I guess there are still people who prefer plain timezones over city based timezones. The plugin should just have passed the tzid to php, unless there was an unusual format that it did not have code to detect.

    some comments:
    http://stackoverflow.com/questions/9523917/are-us-eastern-and-us-central-and-us-pacific-deprecated-for-strftime-or-ju

  5. anmari
    Member
    Plugin Author

    Posted 2 years ago #

    Hi Peter,
    I've been playing around with this and cannot recreate the problem you describe.

    ONly way it would show europe/london and be 5 hours 'off 'would be if your wp timezone was at default (you may have changed it now) and thus be at UTC... same as london, and yes us/easter is -5 off GMT.

    and yes if the plugin had converted to the website's timezone it would change the time to the time in that zone (ie the london zone).

    If you have now set your wordpress timezone to new york (wp does not allow us/eastern), then the times will be as you expect them to be.

    let me know if that is not the case.

  6. Peter Baylies
    Member
    Posted 1 year ago #

    anmari,

    I can verify that we're still having this issue in the current version of the plugin; the calendar itself actually uses a mix of TZID=US/Eastern and TZID=America/New_York depending on the event entry. It is getting pulled down from iCloud and the entries in the iCal file look like so:

    BEGIN:VEVENT
    DTSTART;TZID=US/Eastern:20121031T183000

    My hacky fix for this was to do the following at the beginning of amr_parseTZID():

    $text = str_replace( 'US/Eastern', 'America/New_York', $text );
  7. anmari
    Member
    Plugin Author

    Posted 1 year ago #

    As noted above, this is a common problem due to fact that php does not recognise 'US/Eastern' as a valid timezone identifier.

    Only way for now to cater for calendar providers who insist on using those is to 'translate' them as Peter has done above.

    I'm hesitant to add the overhead of checking for those into the common code.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.