author | zautrix <zautrix> | 2004-09-18 16:32:35 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-18 16:32:35 (UTC) |
commit | a355a58898d0d08d797f872751254cfa958387c1 (patch) (unidiff) | |
tree | ce338c8cc9785d6351a8a8b66fb8e5c1602ceab0 /kabc | |
parent | bf18a7b4edb4121fd2ea974ac1ec634167c9b993 (diff) | |
download | kdepimpi-a355a58898d0d08d797f872751254cfa958387c1.zip kdepimpi-a355a58898d0d08d797f872751254cfa958387c1.tar.gz kdepimpi-a355a58898d0d08d797f872751254cfa958387c1.tar.bz2 |
time fixes
-rw-r--r-- | kabc/addressbook.cpp | 9 |
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 | |||
@@ -457,14 +457,19 @@ void AddressBook::insertAddressee( const Addressee &a, bool setRev ) | |||
457 | 457 | ||
458 | (*it) = a; | 458 | (*it) = a; |
459 | if ( (*it).resource() == 0 ) | 459 | if ( (*it).resource() == 0 ) |
460 | (*it).setResource( standardResource() ); | 460 | (*it).setResource( standardResource() ); |
461 | 461 | ||
462 | if ( changed ) { | 462 | if ( changed ) { |
463 | if ( setRev ) | 463 | if ( setRev ) { |
464 | (*it).setRevision( QDateTime::currentDateTime() ); | 464 | // get rid of micro seconds |
465 | QDateTime dt = QDateTime::currentDateTime(); | ||
466 | QTime t = dt.time(); | ||
467 | dt.setTime( QTime (t.hour (), t.minute (), t.second () ) ); | ||
468 | (*it).setRevision( dt ); | ||
469 | } | ||
465 | (*it).setChanged( true ); | 470 | (*it).setChanged( true ); |
466 | } | 471 | } |
467 | 472 | ||
468 | return; | 473 | return; |
469 | } | 474 | } |
470 | } | 475 | } |