summaryrefslogtreecommitdiffabout
path: root/libkcal/phoneformat.cpp
Side-by-side diff
Diffstat (limited to 'libkcal/phoneformat.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/phoneformat.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/libkcal/phoneformat.cpp b/libkcal/phoneformat.cpp
index 3555dc6..281434e 100644
--- a/libkcal/phoneformat.cpp
+++ b/libkcal/phoneformat.cpp
@@ -296,9 +296,7 @@ bool PhoneFormat::load( Calendar *calendar, Calendar *existingCal)
fileName = "/tmp/phonefile.vcs";
#endif
QString command;
- int ret = PhoneAccess::readFromPhone( fileName );
- if ( ret != 0 ) {
- qDebug("Error::command returned %d", ret);
+ if ( ! PhoneAccess::readFromPhone( fileName )) {
return false;
}
VCalFormat vfload;
@@ -487,8 +485,11 @@ bool PhoneFormat::writeToPhone( Calendar * calendar)
VCalFormat vfsave;
vfsave.setLocalTime ( true );
+ QString id = calendar->timeZoneId();
+ calendar->setLocalTime();
if ( ! vfsave.save( calendar, fileName ) )
return false;
+ calendar->setTimeZoneId( id );
return PhoneAccess::writeToPhone( fileName );
}
bool PhoneFormat::save( Calendar *calendar)