Hi, it seems I forgot to attach my patch file for the reported patch. So I''ve attached it here. Sam, what do you say? Cheers! Max -------------- next part -------------- A non-text attachment was scrubbed... Name: vpim-patch-fix-rrule-time-creation.patch Type: text/x-diff Size: 657 bytes Desc: not available Url : http://rubyforge.org/pipermail/vpim-talk/attachments/20080423/c3544cd2/attachment.bin
On Wed, Apr 23, 2008 at 4:47 AM, Max Jonas Werner <vpim-talk at maxwerner.de> wrote:> Hi, > > it seems I forgot to attach my patch file for the reported patch. So I''ve > attached it here. > > Sam, what do you say?What is it intended to solve? It seems it changes the meaning of DTSTART. A meeting starting at 9AM in toronto, daily, 5 times shouldn''t turn into a meeting at 6AM daily, which would happen if I called start.getlocal on the west coast. Can you explain what you are trying to do? Maybe provide some sample data/unit tests, something? Cheers, Sam
Hi Sam, On Friday 25 April 2008 08:56:46 Sam Roberts wrote:> On Wed, Apr 23, 2008 at 4:47 AM, Max Jonas Werner > <vpim-talk at maxwerner.de> wrote: > > Hi, > > > > it seems I forgot to attach my patch file for the reported patch. So I''ve > > attached it here. > > > > Sam, what do you say? > > What is it intended to solve? > > It seems it changes the meaning of DTSTART. A meeting starting at 9AM > in toronto, daily, 5 times shouldn''t turn into a meeting at 6AM daily, > which would happen if I called start.getlocal on the west coast. > > Can you explain what you are trying to do? Maybe provide some sample > data/unit tests, something?I''ve tried to explaing what the patch does in the patch description: http://rubyforge.org/tracker/index.php?func=detail&aid=19685&group_id=218&atid=909 The problem is that if you don''t set dtstart to start.getlocal, you have a date in whatever time zone it is saved in in the iCalendar file. But line 271 creates a Time object in local time from the values in dtstart (implicitly) disregarding the actual time zone from the original DTSTART value from the iCalendar file. Max
On Sun, Apr 27, 2008 at 9:48 AM, Max Jonas Werner <vpim-talk at maxwerner.de> wrote:> Hi Sam, > On Friday 25 April 2008 08:56:46 Sam Roberts wrote: > > Can you explain what you are trying to do? Maybe provide some sample > > data/unit tests, something? > > I''ve tried to explaing what the patch does in the patch description: > http://rubyforge.org/tracker/index.php?func=detail&aid=19685&group_id=218&atid=909Sorry, I didn''t notice the example VEVENT you posted.> The problem is that if you don''t set dtstart to start.getlocal, you have a > date in whatever time zone it is saved in in the iCalendar file. But line 271 > creates a Time object in local time from the values in dtstart (implicitly) > disregarding the actual time zone from the original DTSTART value from the > iCalendar file.vPim doesn''t support timezones, but I guess this patch doesn''t break anything worse than it was. The times yielded should be 9:30 AM UTC, with this patch they are yielded in local time, but at least it is the local time equivalent of the the UTC time. Notice that with this hack, any recurrence rule clauses that modify hours, like BYHOUR=9,3 (say the meeting happens twice a day) will be completely broken. Luckily (?), vPim doesn''t support BYHOUR. The right thing is to recognize the timezone of the DTSTART, do date arithmetic in its timezone, and yield times in that timezone, but that will wait until I need it, or somebody else needs it enough to get it implemented. Anyhow, thanks for the patch and testcase, Max, I''ll apply it. Cheers, Sam