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!
Comment | File | Size | Author |
---|---|---|---|
addtocal-timezone-yahoo.patch | 3.83 KB | aasarava |
Comments
Comment #1
mlanth CreditAttribution: mlanth commentedHad 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.
Comment #2
petednz CreditAttribution: petednz commentedperhaps 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)
Comment #3
leex CreditAttribution: leex commentedI've patched against dev and in my use case this works as expected. Thanks!
Comment #4
xurizaemonAFAICT 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?
Comment #5
Simon Georges CreditAttribution: Simon Georges commentedSeveral people have tested the patch and said it works as advertised, so changing the status.
Comment from @xurizaemon should eventually be addressed.
Comment #6
xurizaemonI 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.
Comment #8
Anonymous (not verified) CreditAttribution: Anonymous commentedThanks for the patch, aasarava; it looks all good, and I'm committing it. Thanks to everyone in this thread who tested it as well.
Comment #9
thalemn CreditAttribution: thalemn commentedCan 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