From: Steve Brokenshire Date: Sun, 31 Jan 2016 17:38:16 +0000 (+0000) Subject: Added code to process the DTSTAMP property in CalendarFreeBusyObject. X-Git-Tag: release-0.02~433 X-Git-Url: http://Server1/repobrowser/?a=commitdiff_plain;h=5a226f9919ab9484c14f5e1d3a1618326a75e4db;p=xestiacalendar%2F.git Added code to process the DTSTAMP property in CalendarFreeBusyObject. --- diff --git a/source/objects/calendarfreebusy/CalendarFreeBusy.cpp b/source/objects/calendarfreebusy/CalendarFreeBusy.cpp index 5e729bc..227e77d 100644 --- a/source/objects/calendarfreebusy/CalendarFreeBusy.cpp +++ b/source/objects/calendarfreebusy/CalendarFreeBusy.cpp @@ -146,4 +146,24 @@ void CalendarFreeBusyObject::ProcessData(){ string *PropertyNameData = nullptr; int ObjectSeekCount = 0; + // Get the Date Time Stamp (DTSTAMP). + + DataReceived = ProcessTextVectors(&ObjectName, &ObjectData, false, "DTSTAMP"); + + // Process the data from DTSTAMP. + + if (DataReceived.begin() != DataReceived.end()){ + + try { + DateTimeStampTokens = DataReceived.begin()->first.substr(8); + } + + catch(const out_of_range &oor){ + // Do nothing as there is no data. + } + + DateTimeStampData = DataReceived.begin()->second; + + } + } \ No newline at end of file