harvesterplugins/notes/src/notesplugin.cpp
changeset 11 773be20e0a25
parent 7 51d10d255e92
child 13 0a2ec6860a93
child 17 7d8c8d8f5eab
--- a/harvesterplugins/notes/src/notesplugin.cpp	Fri Jun 11 13:39:26 2010 +0300
+++ b/harvesterplugins/notes/src/notesplugin.cpp	Wed Jun 23 18:13:49 2010 +0300
@@ -53,7 +53,7 @@
 _LIT(KNpdUpdateTime , "Date");
 
 //Reference from CPix calender harvester plugin.
-_LIT(KNotesTimeFormat , "%F%/0%Y %M %D %H%T"); // Locale independent YYYYMMDDHHMM
+_LIT(KNotesTimeFormat,"%04d %02d %02d %02d %02d");
 
 // ---------------------------------------------------------------------------
 // CNotesPlugin::NewL
@@ -346,8 +346,13 @@
 		index_item->AddFieldL(KNpdMemo, entry->DescriptionL());
 		// Add Date fields
 		TBuf<30> dateString;
-		TTime endTime = entry->EndTimeL().TimeUtcL();
-		endTime.FormatL(dateString, KNotesTimeFormat);
+		TDateTime datetime = entry->EndTimeL().TimeUtcL().DateTime();		
+		dateString.Format( KNotesTimeFormat, datetime.Year(),
+                                     TInt(datetime.Month()+ 1),
+                                     datetime.Day() + 1,
+                                     datetime.Hour()+ 1,
+                                     datetime.Minute());
+		 
 		index_item->AddFieldL(KNpdUpdateTime, dateString, CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized);
 
 		index_item->AddFieldL(KMimeTypeField, KMimeTypeNotes, CDocumentField::EStoreYes | CDocumentField::EIndexUnTokenized);