Patch for allDayEvents: write UTC DateTime for DTSTART and DTEND

View: New views
1 Messages — Rating Filter:   Alert me  

Patch for allDayEvents: write UTC DateTime for DTSTART and DTEND

by Arvid Requate-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

the attached Patch addresses an issue with the representation of DTSTART and
DTEND in the SyncML Data for allDayEvents:

The attached sync debug output (server_14_conv.xml) shows that allDayEvents
the DTSTART an DTEND of allDayEvents are lacking the trailing "Z", which
probably will cause the dates to be interpreted as local time instead of UTC
time, probably bypassing the convertUTC2LocalTime call in
SyncML_Device::convertServer2Client and finally leading to a wrong
interpretation by SyncML clients.

Regards,
Arvid Requate

--
Arvid Requate
Open Source Software Engineer

Univention GmbH
Linux for your business
Mary-Somerville-Str.1
28359 Bremen
Tel. : +49 421 22232-0
Fax : +49 421 22232-99

requate@...
http://www.univention.de

Geschäftsführer: Peter H. Ganten
HRB 20755 Amtsgericht Bremen
Steuer-Nr.: 71-597-02876

<?xml version="1.0"?>
<!DOCTYPE SyncML PUBLIC "-//SYNCML//DTD SyncML 1.1//EN" "http://www.syncml.org/docs/syncml_represent_v11_20020213.dtd">
<SyncML xmlns="syncml:SYNCML1.1">
    <SyncHdr>
        <VerDTD>1.1</VerDTD>
        <VerProto>SyncML/1.1</VerProto>
        <SessionID>fyyk7sbs--ht--vfu5c4</SessionID>
        <MsgID>5</MsgID>
        <Target>
            <LocURI>IMEI:252f7df1</LocURI>
            <LocName>mmuster@...</LocName>
        </Target>
        <Source>
            <LocURI>https://82.198.197.132/horde3/rpc.php</LocURI>
        </Source>
        <RespURI>https://82.198.197.132/horde3/rpc.php</RespURI>
        <Meta>
            <MaxMsgSize xmlns="syncml:metinf">1000000000</MaxMsgSize>
            <MaxObjSize xmlns="syncml:metinf">1000000000</MaxObjSize>
        </Meta>
    </SyncHdr>
    <SyncBody>
        <Status>
            <CmdID>1</CmdID>
            <MsgRef>5</MsgRef>
            <CmdRef>0</CmdRef>
            <Cmd>SyncHdr</Cmd>
            <TargetRef>https://82.198.197.132/horde3/rpc.php</TargetRef>
            <SourceRef>IMEI:252f7df1</SourceRef>
            <Data>200</Data>
        </Status>
        <Status>
            <CmdID>2</CmdID>
            <MsgRef>5</MsgRef>
            <CmdRef>97</CmdRef>
            <Cmd>Alert</Cmd>
            <Data>200</Data>
        </Status>
        <Status>
            <CmdID>3</CmdID>
            <MsgRef>5</MsgRef>
            <CmdRef>73</CmdRef>
            <Cmd>Map</Cmd>
            <TargetRef>calendar</TargetRef>
            <SourceRef>./calendar</SourceRef>
            <Data>200</Data>
        </Status>
        <Status>
            <CmdID>4</CmdID>
            <MsgRef>5</MsgRef>
            <CmdRef>75</CmdRef>
            <Cmd>Map</Cmd>
            <TargetRef>calendar</TargetRef>
            <SourceRef>./calendar</SourceRef>
            <Data>200</Data>
        </Status>
        <Status>
            <CmdID>5</CmdID>
            <MsgRef>5</MsgRef>
            <CmdRef>77</CmdRef>
            <Cmd>Map</Cmd>
            <TargetRef>calendar</TargetRef>
            <SourceRef>./calendar</SourceRef>
            <Data>200</Data>
        </Status>
        <Status>
            <CmdID>6</CmdID>
            <MsgRef>5</MsgRef>
            <CmdRef>79</CmdRef>
            <Cmd>Map</Cmd>
            <TargetRef>calendar</TargetRef>
            <SourceRef>./calendar</SourceRef>
            <Data>200</Data>
        </Status>
        <Status>
            <CmdID>7</CmdID>
            <MsgRef>5</MsgRef>
            <CmdRef>81</CmdRef>
            <Cmd>Map</Cmd>
            <TargetRef>calendar</TargetRef>
            <SourceRef>./calendar</SourceRef>
            <Data>200</Data>
        </Status>
        <Status>
            <CmdID>8</CmdID>
            <MsgRef>5</MsgRef>
            <CmdRef>83</CmdRef>
            <Cmd>Map</Cmd>
            <TargetRef>calendar</TargetRef>
            <SourceRef>./calendar</SourceRef>
            <Data>200</Data>
        </Status>
        <Status>
            <CmdID>9</CmdID>
            <MsgRef>5</MsgRef>
            <CmdRef>85</CmdRef>
            <Cmd>Map</Cmd>
            <TargetRef>calendar</TargetRef>
            <SourceRef>./calendar</SourceRef>
            <Data>200</Data>
        </Status>
        <Status>
            <CmdID>10</CmdID>
            <MsgRef>5</MsgRef>
            <CmdRef>87</CmdRef>
            <Cmd>Map</Cmd>
            <TargetRef>calendar</TargetRef>
            <SourceRef>./calendar</SourceRef>
            <Data>200</Data>
        </Status>
        <Status>
            <CmdID>11</CmdID>
            <MsgRef>5</MsgRef>
            <CmdRef>89</CmdRef>
            <Cmd>Map</Cmd>
            <TargetRef>calendar</TargetRef>
            <SourceRef>./calendar</SourceRef>
            <Data>200</Data>
        </Status>
        <Status>
            <CmdID>12</CmdID>
            <MsgRef>5</MsgRef>
            <CmdRef>91</CmdRef>
            <Cmd>Map</Cmd>
            <TargetRef>calendar</TargetRef>
            <SourceRef>./calendar</SourceRef>
            <Data>200</Data>
        </Status>
        <Status>
            <CmdID>13</CmdID>
            <MsgRef>5</MsgRef>
            <CmdRef>93</CmdRef>
            <Cmd>Map</Cmd>
            <TargetRef>calendar</TargetRef>
            <SourceRef>./calendar</SourceRef>
            <Data>200</Data>
        </Status>
        <Status>
            <CmdID>14</CmdID>
            <MsgRef>5</MsgRef>
            <CmdRef>95</CmdRef>
            <Cmd>Map</Cmd>
            <TargetRef>calendar</TargetRef>
            <SourceRef>./calendar</SourceRef>
            <Data>200</Data>
        </Status>
        <Sync>
            <CmdID>15</CmdID>
            <Target>
                <LocURI>./calendar</LocURI>
            </Target>
            <Source>
                <LocURI>calendar</LocURI>
            </Source>
            <Add>
                <CmdID>16</CmdID>
                <Meta>
                    <Type xmlns="syncml:metinf">text/x-vcalendar</Type>
                </Meta>
                <Item>
                    <Source>
                        <LocURI>06e683590e206498fd01179b1e9781a6</LocURI>
                    </Source>
                    <Data><![CDATA[BEGIN:VCALENDAR
VERSION:1.0
X-WR-CALNAME:Kalender
PRODID:-//The Horde Project//Horde_iCalendar Library//EN
METHOD:PUBLISH
BEGIN:VEVENT
DTSTART:20090820T170000Z
DTEND:20090820T210000Z
DTSTAMP:20090928T160744Z
DCREATED:20090921T102239Z
LAST-MODIFIED:20090921T102239Z
SUMMARY:E2 23b
ORGANIZER;CN=Michael Mustermann:mailto:mmuster@...
CLASS:PRIVATE
STATUS:CONFIRMED
TRANSP:0
RRULE:YM1 8 19700101T225959Z
END:VEVENT
END:VCALENDAR]]></Data>
                </Item>
            </Add>
            <Add>
                <CmdID>17</CmdID>
                <Meta>
                    <Type xmlns="syncml:metinf">text/x-vcalendar</Type>
                </Meta>
                <Item>
                    <Source>
                        <LocURI>a43d006ce6ab5543c54118f116dcbdc5</LocURI>
                    </Source>
                    <Data><![CDATA[BEGIN:VCALENDAR
VERSION:1.0
X-WR-CALNAME:Kalender
PRODID:-//The Horde Project//Horde_iCalendar Library//EN
METHOD:PUBLISH
BEGIN:VEVENT
DTSTART:20090828T000000
DTEND:20090828T235959
DTSTAMP:20090928T160744Z
DCREATED:20090914T164856Z
LAST-MODIFIED:20090923T164916Z
SUMMARY:On-call duty HordeA
ORGANIZER;CN=Michael Mustermann:mailto:mmuster@...
DESCRIPTION:Extremely boring...
CATEGORIES:work
LOCATION:Somewhere, Atlantic Ocean
CLASS:PUBLIC
STATUS:FREE
TRANSP:1
AALARM:20090827T214500Z
END:VEVENT
END:VCALENDAR]]></Data>
                </Item>
            </Add>
            <Add>
                <CmdID>18</CmdID>
                <Meta>
                    <Type xmlns="syncml:metinf">text/x-vcalendar</Type>
                </Meta>
                <Item>
                    <Source>
                        <LocURI>libkcal-2133089375.847</LocURI>
                    </Source>
                    <Data><![CDATA[BEGIN:VCALENDAR
VERSION:1.0
X-WR-CALNAME:Kalender
PRODID:-//The Horde Project//Horde_iCalendar Library//EN
METHOD:PUBLISH
BEGIN:VEVENT
DTSTART:20090825T030000Z
DTEND:20090825T050000Z
DTSTAMP:20090928T160744Z
DCREATED:20090925T125615Z
LAST-MODIFIED:20090925T125714Z
SUMMARY:Testevent1
ORGANIZER;CN=Michael Mustermann:mailto:mmuster@...
DESCRIPTION:Kommentar1
CATEGORIES:birthday
LOCATION:Somewhere1
CLASS:PRIVATE
STATUS:FREE
TRANSP:1
ATTENDEE;EXPECT=REQUIRE;STATUS=NEEDS ACTION;RSVP=YES:Danielle Musterfrau <dani@...>
END:VEVENT
END:VCALENDAR]]></Data>
                </Item>
            </Add>
            <Add>
                <CmdID>19</CmdID>
                <Meta>
                    <Type xmlns="syncml:metinf">text/x-vcalendar</Type>
                </Meta>
                <Item>
                    <Source>
                        <LocURI>fdeb8aa8ced65df2f7f7adf560edbd3e</LocURI>
                    </Source>
                    <Data><![CDATA[BEGIN:VCALENDAR
VERSION:1.0
X-WR-CALNAME:Kalender
PRODID:-//The Horde Project//Horde_iCalendar Library//EN
METHOD:PUBLISH
BEGIN:VEVENT
DTSTART:20090825T163000Z
DTEND:20090825T214500Z
DTSTAMP:20090928T160744Z
DCREATED:20090914T170640Z
LAST-MODIFIED:20090925T143815Z
SUMMARY:Group meeting HordeA
ORGANIZER;CN=Michael Mustermann:mailto:mmuster@...
DESCRIPTION:Weekly Meeting
LOCATION:Meetingroom
CLASS:PRIVATE
STATUS:CONFIRMED
TRANSP:0
ATTENDEE;EXPECT=REQUIRE;STATUS=NEEDS ACTION;RSVP=YES:Danielle1 Musterfrau <dani1@...>
ATTENDEE;EXPECT=REQUEST;STATUS=TENTATIVE:Danielle Musterfrau <dani2@...>
ATTENDEE;EXPECT=FYI;STATUS=NEEDS ACTION;RSVP=YES:Danielle3 Musterfrau <dani3@...>
ATTENDEE;EXPECT=REQUIRE;STATUS=DECLINED:Danielle Musterfrau <dani4@...>
AALARM:20090825T161500Z
END:VEVENT
END:VCALENDAR]]></Data>
                </Item>
            </Add>
            <Add>
                <CmdID>20</CmdID>
                <Meta>
                    <Type xmlns="syncml:metinf">text/x-vcalendar</Type>
                </Meta>
                <Item>
                    <Source>
                        <LocURI>72acddc6a29096e1c22e744084407fb2</LocURI>
                    </Source>
                    <Data><![CDATA[BEGIN:VCALENDAR
VERSION:1.0
X-WR-CALNAME:Kalender
PRODID:-//The Horde Project//Horde_iCalendar Library//EN
METHOD:PUBLISH
BEGIN:VEVENT
DTSTART:20090826T150000Z
DTEND:20090826T154500Z
DTSTAMP:20090928T160744Z
DCREATED:20090925T160232Z
LAST-MODIFIED:20090925T161018Z
SUMMARY:E2 11c
ORGANIZER;CN=Michael Mustermann:mailto:mmuster@...
DESCRIPTION:Recurrencetest
LOCATION:Hier
CLASS:PUBLIC
STATUS:CONFIRMED
TRANSP:0
RRULE:D1 20090917T215959Z
END:VEVENT
END:VCALENDAR]]></Data>
                </Item>
            </Add>
            <Add>
                <CmdID>21</CmdID>
                <Meta>
                    <Type xmlns="syncml:metinf">text/x-vcalendar</Type>
                </Meta>
                <Item>
                    <Source>
                        <LocURI>libkcal-1481895104.961</LocURI>
                    </Source>
                    <Data><![CDATA[BEGIN:VCALENDAR
VERSION:1.0
X-WR-CALNAME:Kalender
PRODID:-//The Horde Project//Horde_iCalendar Library//EN
METHOD:PUBLISH
BEGIN:VEVENT
DTSTART:20090826T150000Z
DTEND:20090826T154500Z
DTSTAMP:20090928T160744Z
DCREATED:20090915T154259Z
LAST-MODIFIED:20090925T165046Z
SUMMARY:Event 2-14 Kontact
ORGANIZER;CN=Michael Mustermann:mailto:mmuster@...
DESCRIPTION:Recurrence test2
CLASS:PUBLIC
STATUS:FREE
TRANSP:1
RRULE:D1 #11
EXDATE:20090829T150000Z
EXDATE:20090903T150000Z
END:VEVENT
END:VCALENDAR]]></Data>
                </Item>
            </Add>
            <Add>
                <CmdID>22</CmdID>
                <Meta>
                    <Type xmlns="syncml:metinf">text/x-vcalendar</Type>
                </Meta>
                <Item>
                    <Source>
                        <LocURI>b6e82cb6ad9c5162f34762b8c8d593a0</LocURI>
                    </Source>
                    <Data><![CDATA[BEGIN:VCALENDAR
VERSION:1.0
X-WR-CALNAME:Kalender
PRODID:-//The Horde Project//Horde_iCalendar Library//EN
METHOD:PUBLISH
BEGIN:VEVENT
DTSTART:20090808T084500Z
DTEND:20090808T150000Z
DTSTAMP:20090928T160744Z
DCREATED:20090915T110404Z
LAST-MODIFIED:20090925T174337Z
SUMMARY:Event 2-21 HordeA
ORGANIZER;CN=Michael Mustermann:mailto:mmuster@...
DESCRIPTION:Recurrencetest
CLASS:PUBLIC
STATUS:FREE
TRANSP:1
RRULE:MD1 8 #0
END:VEVENT
END:VCALENDAR]]></Data>
                </Item>
            </Add>
            <Add>
                <CmdID>23</CmdID>
                <Meta>
                    <Type xmlns="syncml:metinf">text/x-vcalendar</Type>
                </Meta>
                <Item>
                    <Source>
                        <LocURI>94bcc3e93445523368fe55cd571c97ba</LocURI>
                    </Source>
                    <Data><![CDATA[BEGIN:VCALENDAR
VERSION:1.0
X-WR-CALNAME:Kalender
PRODID:-//The Horde Project//Horde_iCalendar Library//EN
METHOD:PUBLISH
BEGIN:VEVENT
DTSTART:20090825T083000Z
DTEND:20090825T084500Z
DTSTAMP:20090928T160744Z
DCREATED:20090928T085847Z
LAST-MODIFIED:20090928T085847Z
SUMMARY:Private Event from 10:30 to 10:45
ORGANIZER;CN=Michael Mustermann:mailto:mmuster@...
CLASS:PRIVATE
STATUS:CONFIRMED
TRANSP:0
AALARM:20090824T083000Z
END:VEVENT
END:VCALENDAR]]></Data>
                </Item>
            </Add>
            <Add>
                <CmdID>24</CmdID>
                <Meta>
                    <Type xmlns="syncml:metinf">text/x-vcalendar</Type>
                </Meta>
                <Item>
                    <Source>
                        <LocURI>e68b2aa8abd32231dff11cf34b2a6b35</LocURI>
                    </Source>
                    <Data><![CDATA[BEGIN:VCALENDAR
VERSION:1.0
X-WR-CALNAME:Kalender
PRODID:-//The Horde Project//Horde_iCalendar Library//EN
METHOD:PUBLISH
BEGIN:VEVENT
DTSTART:20090825T083000Z
DTEND:20090825T084500Z
DTSTAMP:20090928T160744Z
DCREATED:20090914T171042Z
LAST-MODIFIED:20090928T085847Z
SUMMARY:Alarmevent2  HordeA
ORGANIZER;CN=Michael Mustermann:mailto:mmuster@...
CLASS:PRIVATE
STATUS:CONFIRMED
TRANSP:0
AALARM:20090824T083000Z
END:VEVENT
END:VCALENDAR]]></Data>
                </Item>
            </Add>
            <Add>
                <CmdID>25</CmdID>
                <Meta>
                    <Type xmlns="syncml:metinf">text/x-vcalendar</Type>
                </Meta>
                <Item>
                    <Source>
                        <LocURI>libkcal-1645786893.212</LocURI>
                    </Source>
                    <Data><![CDATA[BEGIN:VCALENDAR
VERSION:1.0
X-WR-CALNAME:Kalender
PRODID:-//The Horde Project//Horde_iCalendar Library//EN
METHOD:PUBLISH
BEGIN:VEVENT
DTSTART:20090825T000000
DTEND:20090827T235959
DTSTAMP:20090928T160744Z
DCREATED:20090915T151654Z
LAST-MODIFIED:20090928T085849Z
SUMMARY:On-call duty Kontact
ORGANIZER;CN=Michael Mustermann:mailto:mmuster@...
DESCRIPTION:Extremely boring...
CATEGORIES:work
LOCATION:Elsewhere, Atlantic Ocean
CLASS:PUBLIC
STATUS:FREE
TRANSP:1
AALARM:20090824T214500Z
END:VEVENT
END:VCALENDAR]]></Data>
                </Item>
            </Add>
            <Add>
                <CmdID>26</CmdID>
                <Meta>
                    <Type xmlns="syncml:metinf">text/x-vcalendar</Type>
                </Meta>
                <Item>
                    <Source>
                        <LocURI>53326fcb55d7df67f05b0f474d714e24</LocURI>
                    </Source>
                    <Data><![CDATA[BEGIN:VCALENDAR
VERSION:1.0
X-WR-CALNAME:Kalender
PRODID:-//The Horde Project//Horde_iCalendar Library//EN
METHOD:PUBLISH
BEGIN:VEVENT
DTSTART:20090825T000000
DTEND:20090827T235959
DTSTAMP:20090928T160744Z
DCREATED:20090914T165430Z
LAST-MODIFIED:20090928T085850Z
SUMMARY:On-call duty HordeA
ORGANIZER;CN=Michael Mustermann:mailto:mmuster@...
CATEGORIES:work
LOCATION:Elsewhere, Atlantic Ocean
CLASS:PUBLIC
STATUS:FREE
TRANSP:1
AALARM:20090824T214500Z
END:VEVENT
END:VCALENDAR]]></Data>
                </Item>
            </Add>
        </Sync>
    </SyncBody>
</SyncML>

[attachment removed]
--
sync mailing list - Join the hunt: http://horde.org/bounties/#sync
Frequently Asked Questions: http://horde.org/faq/
To unsubscribe, mail: sync-unsubscribe@...