[asterisk-dev] [Code Review] fixing the wrong timezone for an alarm time from a calendar event when alarm is only an offset

opticron reviewboard at asterisk.org
Fri Apr 27 07:41:03 CDT 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/1839/#review6085
-----------------------------------------------------------

Ship it!


Looks good to me as well along with the suggested change in the ical module.

- opticron


On April 2, 2012, 9:58 a.m., schmidts wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviewboard.asterisk.org/r/1839/
> -----------------------------------------------------------
> 
> (Updated April 2, 2012, 9:58 a.m.)
> 
> 
> Review request for Asterisk Developers and Terry Wilson.
> 
> 
> Summary
> -------
> 
> using google calendar with timezone GMT+2 (like my local timezone) and caldav to get calendar events. And i recognize that the alarm time was allways 2 hours later than the start time. Start and end time was correct but the alarm was allways wrong, even when i changed the timezone.
> by going through the code i found that this happens when the alarm is given as an offset to the start time.
> Fix is very easy to not convert the alarm time to utc but instead use the timezone from the start time itself.
> 
> 
> Diffs
> -----
> 
>   branches/10/res/res_calendar_caldav.c 358376 
> 
> Diff: https://reviewboard.asterisk.org/r/1839/diff
> 
> 
> Testing
> -------
> 
> before my patch i got this events:
> 
> Events
> ------
> Summary     :                                         
> Description :                                         
> Organizer   :                                         
> Location    :                                         
> Categories  :                                         
> Priority    : 0
> UID         : 3l14kh1vr2kpn55899u6q8pafo at google.com   
> Start       : 2012-04-02 04:15:00 PM +0200            
> End         : 2012-04-02 05:15:00 PM +0200            
> Alarm       : 2012-04-02 06:12:00 PM +0200  
> 
> and with my patch the same event looks like this:
> 
> Events
> ------
> Summary     :                                         
> Description :                                         
> Organizer   :                                         
> Location    :                                         
> Categories  :                                         
> Priority    : 0
> UID         : 3l14kh1vr2kpn55899u6q8pafo at google.com   
> Start       : 2012-04-02 04:15:00 PM +0200            
> End         : 2012-04-02 05:15:00 PM +0200            
> Alarm       : 2012-04-02 04:12:00 PM +0200 
> 
> 
> Thanks,
> 
> schmidts
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120427/b6e7d0d0/attachment-0001.htm>


More information about the asterisk-dev mailing list