[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE_3_3_BRANCH: kdepim
From:       Reinhold Kainhofer <reinhold () kainhofer ! com>
Date:       2004-11-18 1:09:34
Message-ID: 20041118010934.1531316B6C () office ! kde ! org
[Download RAW message or body]

CVS commit by kainhofe: 

Backport to the 3.3 Branch of fix for Bug 88005 (times were sent to the server \
without being shifted to UTC. This was caused by the tzid not being correctly \
propagated to the uploader)

CCBUG: 88005


  M +4 -2      kresources/exchange/resourceexchange.cpp   1.32.2.3
  M +4 -2      libkpimexchange/core/exchangeupload.cpp   1.13.2.1


--- kdepim/kresources/exchange/resourceexchange.cpp  #1.32.2.2:1.32.2.3
@@ -70,5 +70,6 @@ public:
 
 ResourceExchange::ResourceExchange( const KConfig *config )
-  : ResourceCalendar( config ), mCache(0), mDates(0)
+  : ResourceCalendar( config ), mClient(0), mMonitor(0), mCache(0), mDates(0), 
+    mEventDates(0), mCacheDates(0)
 {
   mLock = new KABC::LockNull( true );
@@ -117,5 +118,5 @@ bool ResourceExchange::doOpen()
   kdDebug() << "ResourceExchange::doOpen()" << endl;
 
-  mClient = new ExchangeClient( mAccount );
+  mClient = new ExchangeClient( mAccount, mTimeZoneId );
   connect( mClient, SIGNAL( downloadFinished( int, const QString & ) ),
            SLOT( slotDownloadFinished( int, const QString & ) ) );
@@ -550,4 +551,5 @@ void ResourceExchange::setTimeZoneId( co
   mTimeZoneId = tzid;
   if ( mCache ) mCache->setTimeZoneId( tzid );
+  if ( mClient ) mClient->setTimeZoneId( tzid );
 }
 

--- kdepim/libkpimexchange/core/exchangeupload.cpp  #1.13:1.13.2.1
@@ -248,4 +248,5 @@ void ExchangeUpload::startUpload( const 
   // KLUDGE: somehow we need to take the opposite of the
   // value that localUTCOffset() supplies...
+  // FIXME: What do we need that offset for anyway???
   int tzOffset = - KRFCDate::localUTCOffset(); 
   QString offsetString;
@@ -259,11 +260,12 @@ void ExchangeUpload::startUpload( const 
 
   kdDebug() << "Timezone offset: " << tzOffset << " : " << offsetString << endl;
+  kdDebug() << "ExchangeUpload::mTimeZoneId=" << mTimeZoneId << endl;
 
   addElement( doc, prop, "urn:schemas:calendar:", "dtstart", 
-      event->dtStart().toString( "yyyy-MM-ddThh:mm:ssZ" ) );
+      zoneAsUtc( event->dtStart(), mTimeZoneId ).toString( Qt::ISODate ) + "Z" );
   //    event->dtStart().toString( "yyyy-MM-ddThh:mm:ss.zzzZ" ) );
   //    2002-06-04T08:00:00.000Z" );
   addElement( doc, prop, "urn:schemas:calendar:", "dtend", 
-      event->dtEnd().toString( "yyyy-MM-ddThh:mm:ssZ" ) );
+      zoneAsUtc( event->dtEnd(), mTimeZoneId ).toString( Qt::ISODate ) + "Z" );
 #if 0
   addElement( doc, prop, "urn:schemas:calendar:", "dtstart", 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic