summaryrefslogtreecommitdiffabout
path: root/libkcal/vcalformat.cpp
Side-by-side diff
Diffstat (limited to 'libkcal/vcalformat.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/vcalformat.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libkcal/vcalformat.cpp b/libkcal/vcalformat.cpp
index 4727a7a..309c699 100644
--- a/libkcal/vcalformat.cpp
+++ b/libkcal/vcalformat.cpp
@@ -1471,33 +1471,33 @@ QDateTime VCalFormat::ISOToQDateTime(const QString & dtStr)
tmpStr = dtStr;
year = tmpStr.left(4).toInt();
month = tmpStr.mid(4,2).toInt();
day = tmpStr.mid(6,2).toInt();
hour = tmpStr.mid(9,2).toInt();
minute = tmpStr.mid(11,2).toInt();
second = tmpStr.mid(13,2).toInt();
tmpDate.setYMD(year, month, day);
tmpTime.setHMS(hour, minute, second);
ASSERT(tmpDate.isValid());
ASSERT(tmpTime.isValid());
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;
}
QDate VCalFormat::ISOToQDate(const QString &dateStr)
{
int year, month, day;
year = dateStr.left(4).toInt();
month = dateStr.mid(4,2).toInt();
day = dateStr.mid(6,2).toInt();
return(QDate(year, month, day));
}
// take a raw vcalendar (i.e. from a file on disk, clipboard, etc. etc.
// and break it down from it's tree-like format into the dictionary format