Great module. But I think we need to make the timezone handling more explicit, rather than simply assuming dates are all in UTC format. When adding all-day items to a Google Calendar, the dates and times were shifted because of this.

The attached patch checks how the dates are stored in the database and explicitly converts them to UTC.

The patch also fixes an apparent error with the end date when adding events to a Yahoo Calendar. Instead of duration, the module now passes an explicit end time, and that seems to work.

It would be great if others could try out this module with other timezone settings for their sites or date fields and report back on whether Google and Yahoo are creating dates with the expected times!

CommentFileSizeAuthor
addtocal-timezone-yahoo.patch3.83 KBaasarava
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mlanth’s picture

Issue summary: View changes

Had a similar problem where adding items to any calendar would not produce the expected time. This patched has fixed my problem, and all times are now displaying as expected.

petednz’s picture

perhaps this should be changed to Status = Reviewed and tested by community if you got the outcome desired.

(not sure on how active the maintenance is of this module though)

i was looking for any pointers that might let us drop timezone altogether ie the ical would just pull in 7pm and would hence go in as 7pm - this is on a site where they have opted to avoid timezone issues by ensuring that events created for another timezone are just adjusted accordingly since the only people who see them are in that timezone

anyhow i think the patch here gives some insight on how to approach this (but always open to suggestions)

leex’s picture

I've patched against dev and in my use case this works as expected. Thanks!

xurizaemon’s picture

AFAICT the Yahoo calendar link currently lacks TZ info - unlike the .ics and .vcal output. Is that correct / expected? Is this patch expected to modify that behaviour?

https://calendar.yahoo.com/?v=60&
  TITLE=Test&
  ST=20140705T113500&
  DUR=0000&
  URL=example.com&
  in_loc=Location
Simon Georges’s picture

Status: Needs review » Reviewed & tested by the community

Several people have tested the patch and said it works as advertised, so changing the status.
Comment from @xurizaemon should eventually be addressed.

xurizaemon’s picture

I agree - if anyone is seriously using Yahoo! cal across timezones, that can be addressed separately. I've no objection to this going in as-is if (as it seems) it improves the current state for most users.

  • 6c1 committed 70bb8b4 on 7.x-1.x authored by aasarava
    Issue #2099939 by aasarava: Fixing timezone handling and Yahoo end date.
    
Anonymous’s picture

Status: Reviewed & tested by the community » Closed (fixed)

Thanks for the patch, aasarava; it looks all good, and I'm committing it. Thanks to everyone in this thread who tested it as well.

thalemn’s picture

Version: 7.x-1.x-dev » 7.x-1.0
Priority: Major » Normal

Can we reopen this issue?

The yahoo calendar url has both start and end times in zulu, and the start time has the db timezone applied, but the end time does not.

I am using 7.x-1.0 version.

Testing here: https://bookstore-dev.umn.edu/events