[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/pim/kblog
From: Christian Weilbach <christian () whiletaker ! homeip ! net>
Date: 2007-03-18 13:05:15
Message-ID: 1174223115.523905.16087.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 643796 by weilbach:
datetime fixes, it now uses utc correctly and changed user-client to KDE-KBlog
M +4 -2 blogger_p.cpp
M +2 -3 metaweblog.cpp
M +4 -2 metaweblog_p.cpp
--- trunk/playground/pim/kblog/blogger_p.cpp #643795:643796
@@ -28,6 +28,8 @@
#include <QtCore/QList>
+#include <KDateTime>
+
using namespace KBlog;
APIBlogger::APIBloggerPrivate::APIBloggerPrivate()
@@ -197,11 +199,11 @@
QStringList mapkeys = postInfo.keys();
kDebug() << endl << "Keys: " << mapkeys.join(", ") << endl << endl;
- KDateTime dt( postInfo[ "dateCreated" ].toDateTime() );
+ KDateTime dt( postInfo[ "dateCreated" ].toDateTime(), KDateTime::Spec::UTC );
if ( dt.isValid() && !dt.isNull() ) {
post->setCreationDateTime( dt );
}
- dt = KDateTime ( postInfo[ "lastModified" ].toDateTime() );
+ dt = KDateTime ( postInfo[ "lastModified" ].toDateTime(), KDateTime::Spec::UTC );
if ( dt.isValid() && !dt.isNull() ) {
post->setModificationDateTime( dt );
}
--- trunk/playground/pim/kblog/metaweblog.cpp #643795:643796
@@ -107,8 +107,7 @@
map["categories"]=list;
map["description"]=posting->content();
map["title"]=posting->title();
- KDateTime date;
- map["dateCreated"]=date.currentUtcDateTime().dateTime();
+ map["lastModified"]=posting->modificationDateTime().toUtc().dateTime();
args << map;
args << QVariant( posting->publish() );
d->mXmlRpcClient->call( "metaWeblog.editPost", args,
@@ -131,7 +130,7 @@
map["categories"]=list;
map["description"]=posting->content();
map["title"]=posting->title();
- map["dateCreated"]=posting->creationDateTime().dateTime(); // TODO use original date of result?
+ map["dateCreated"]=posting->creationDateTime().toUtc().dateTime();
args << map;
args << QVariant( posting->publish() );
d->mXmlRpcClient->call( "metaWeblog.newPost", args,
--- trunk/playground/pim/kblog/metaweblog_p.cpp #643795:643796
@@ -29,6 +29,8 @@
#include <QtCore/QList>
#include <QtCore/QVariant>
+#include <KDateTime>
+
using namespace KBlog;
APIMetaWeblog::APIMetaWeblogPrivate::APIMetaWeblogPrivate()
@@ -217,11 +219,11 @@
QStringList mapkeys = postInfo.keys();
kDebug() << endl << "Keys: " << mapkeys.join(", ") << endl << endl;
- KDateTime dt = KDateTime( postInfo[ "dateCreated" ].toDateTime() );
+ KDateTime dt = KDateTime( postInfo[ "dateCreated" ].toDateTime(), KDateTime::Spec::UTC );
if ( dt.isValid() && !dt.isNull() ) {
post->setCreationDateTime( dt );
}
- dt = KDateTime( postInfo[ "lastModified" ].toDateTime() );
+ dt = KDateTime( postInfo[ "lastModified" ].toDateTime(), KDateTime::Spec::UTC );
if ( dt.isValid() && !dt.isNull() ) {
post->setModificationDateTime( dt );
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic