summaryrefslogtreecommitdiffabout
path: root/kabc/addressbook.cpp
Side-by-side diff
Diffstat (limited to 'kabc/addressbook.cpp') (more/less context) (show whitespace changes)
-rw-r--r--kabc/addressbook.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/kabc/addressbook.cpp b/kabc/addressbook.cpp
index 3ec0795..d03dea3 100644
--- a/kabc/addressbook.cpp
+++ b/kabc/addressbook.cpp
@@ -460,8 +460,13 @@ void AddressBook::insertAddressee( const Addressee &a, bool setRev )
(*it).setResource( standardResource() );
if ( changed ) {
- if ( setRev )
- (*it).setRevision( QDateTime::currentDateTime() );
+ if ( setRev ) {
+ // get rid of micro seconds
+ QDateTime dt = QDateTime::currentDateTime();
+ QTime t = dt.time();
+ dt.setTime( QTime (t.hour (), t.minute (), t.second () ) );
+ (*it).setRevision( dt );
+ }
(*it).setChanged( true );
}