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

schmidts reviewboard at asterisk.org
Mon Apr 2 09:58:23 CDT 2012


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

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/20120402/23607b80/attachment.htm>


More information about the asterisk-dev mailing list