From 191ced43b27c047b0a39f0acdc8ba1f8a58817df Mon Sep 17 00:00:00 2001 From: zautrix Date: Tue, 05 Oct 2004 13:34:33 +0000 Subject: fix for filewatch and vcal timezone --- diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 687943e..b1da144 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp @@ -1514,7 +1514,7 @@ bool CalendarView::openCalendar(QString filename, bool merge) setSyncEventsReadOnly(); updateUnmanagedViews(); updateView(); - loadedFileVersion = QDateTime::currentDateTime(); + setLoadedFileVersion( QDateTime::currentDateTime().addSecs( -1 )); if ( filename != MainWindow::defaultFileName() ) { saveCalendar( MainWindow::defaultFileName() ); watchSavedFile(); @@ -1567,6 +1567,7 @@ void CalendarView::watchSavedFile() return; QDateTime dt = finf.lastModified (); if ( dt < loadedFileVersion ) { + //qDebug("watch %s %s ", dt.toString().latin1(), loadedFileVersion.toString().latin1()); QTimer::singleShot( 1000 , this, SLOT ( watchSavedFile() ) ); return; } diff --git a/libkcal/vcalformat.cpp b/libkcal/vcalformat.cpp index 4727a7a..309c699 100644 --- a/libkcal/vcalformat.cpp +++ b/libkcal/vcalformat.cpp @@ -1484,7 +1484,7 @@ QDateTime VCalFormat::ISOToQDateTime(const QString & dtStr) QDateTime tmpDT(tmpDate, tmpTime); // correct for GMT if string is in Zulu format if (dtStr.at(dtStr.length()-1) == 'Z') - tmpDT = tmpDT.addSecs(60*mCalendar->getTimeZone()); + tmpDT = tmpDT.addSecs (KGlobal::locale()->localTimeOffset( tmpDT )*60); return tmpDT; } -- cgit v0.9.0.2