[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/kdepim/enterprise/kdepim/kresources/kolab/shared
From: Allen Winter <winter () kde ! org>
Date: 2009-04-30 20:23:29
Message-ID: 1241123009.157466.31810.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 961858 by winterz:
Remove tailing "ZZ" from dates, if such is found.
Do NOT merge this to any Qt4 based code (e4, trunk, 4.2, etc)
CCMAIL: till@kdab.net
M +5 -1 kolabbase.cpp
--- branches/kdepim/enterprise/kdepim/kresources/kolab/shared/kolabbase.cpp #961857:961858
@@ -411,7 +411,11 @@
QDateTime KolabBase::stringToDateTime( const QString& _date )
{
QString date( _date );
- if ( date.endsWith( "Z" ) )
+ //Deal with data from some clients that always append a Z to dates.
+ if ( date.endsWith( "ZZ" ) )
+ date.truncate( date.length() - 2 );
+ //In Qt3, Qt::ISODate cannot handle a trailing Z for UTC, so remove if found.
+ else if ( date.endsWith( "Z" ) )
date.truncate( date.length() - 1 );
return QDateTime::fromString( date, Qt::ISODate );
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic