[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/3.4/kdepim/kresources/slox
From: Will Stephenson <lists () stevello ! free-online ! co ! uk>
Date: 2005-07-21 15:06:17
Message-ID: 1121958377.152732.23127.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 437333 by wstephens:
Backport fix for offset SLOX appointments
M +12 -1 webdavhandler.cpp
--- branches/KDE/3.4/kdepim/kresources/slox/webdavhandler.cpp #437332:437333
@@ -28,6 +28,8 @@
#endif
#endif
+#include <stdlib.h>
+
#include <libkcal/incidence.h>
#include <libkdepim/kpimprefs.h>
@@ -150,7 +152,16 @@
{
QDateTime utc = KPimPrefs::localTimeToUtc( dt, timeZoneId );
- uint ticks = -utc.secsTo( QDateTime( QDate( 1970, 1, 1 ), QTime( 0, 0 ) ) );
+ // secsTo and toTime_t etc also perform a timezone conversion using the system \
timezone, + // but we want to use the calendar timezone, so we have to convert \
ourself and spoof the tz to UTC before + // converting to ticks to prevent this
+ QCString origTz = getenv("TZ");
+ setenv( "TZ", "UTC", 1 );
+ uint ticks = utc.toTime_t();
+ if ( origTz.isNull() )
+ unsetenv( "TZ" );
+ else
+ setenv( "TZ", origTz, 1 );
return QString::number( ticks ) + "000";
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic