Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added LAST-MODIFIED property for saving data from a CalendarTimezoneObject.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Thu, 9 Jun 2016 21:40:45 +0000 (22:40 +0100)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Thu, 9 Jun 2016 21:40:45 +0000 (22:40 +0100)
Added the code and unit tests for the LAST-MODIFIED property.

source/objects/calendartimezone/CalendarTimezone-Save.cpp
source/tests/xestiacalendar_icaltimezonesave.h

index 2bdadff..8858e15 100644 (file)
@@ -37,6 +37,34 @@ void CalendarTimezoneObject::SaveObjectData(string *SaveData){
                
        }
        
+       // Process the LAST-MODIFIED value.
+       
+       if (LastModifiedData.size() > 0){
+               
+               if (LastModifiedTokens.size() > 0){
+               
+                       DataLine += "LAST-MODIFIED;";
+                       DataLine += LastModifiedTokens;
+                       
+               } else {
+
+                       DataLine += "LAST-MODIFIED";
+                       
+               }
+
+               DataLine += ":";
+               DataLine += LastModifiedData;
+               DataLine += "\n";
+               
+               DataLineProcessed = OutputText(&DataLine);
+               
+               *SaveData += DataLineProcessed;
+               
+               DataLine.clear();
+               DataLineProcessed.clear();
+               
+       }
+       
        *SaveData += "END:VTIMEZONE\n";
        
 }
\ No newline at end of file
index 8afaa2d..eff6583 100644 (file)
@@ -62,6 +62,7 @@ TEST(iCalendarSaveTimezone, SaveTimezoneTests){
        "PRODID:-//Xestia//Calendar Unit Testing//KW\n"
        "BEGIN:VTIMEZONE\n"
        "TZID;OTHER=PARAM:Example/Starrgazy\n"
+       "LAST-MODIFIED;FUTURE=ODD:20160203T200700Z\n"
        "END:VTIMEZONE\n"
        "END:VCALENDAR";
 
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy