-rw-r--r-- | libkcal/phoneformat.cpp | 7 |
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 @@ -295,11 +295,9 @@ bool PhoneFormat::load( Calendar *calendar, Calendar *existingCal) #else 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; vfload.setLocalTime ( true ); @@ -486,10 +484,13 @@ bool PhoneFormat::writeToPhone( Calendar * calendar) #endif 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) { |