mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2025-05-20 15:02:27 +02:00
2024-04-24 Fred Gleason <fredg@paravelsystems.com>
* Fixed a regression in the PyPAD subsystem that broke null datetime handling. Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
parent
8e08dad4a4
commit
ed481ec3f1
@ -24709,3 +24709,6 @@
|
||||
* Added a 'tempdir_test' test harness.
|
||||
2024-04-22 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Added an 'Ubuntu 24.04 LTS' section to 'INSTALL'.
|
||||
2024-04-24 Fred Gleason <fredg@paravelsystems.com>
|
||||
* Fixed a regression in the PyPAD subsystem that broke null datetime
|
||||
handling.
|
||||
|
@ -90,6 +90,8 @@ class Update(object):
|
||||
|
||||
def __fromIso8601(self,string):
|
||||
try:
|
||||
if len(string)==0:
|
||||
return datetime.datetime()
|
||||
return datetime.datetime.strptime(string.strip()[:19],'%Y-%m-%dT%H:%M:%S')
|
||||
except AttributeError:
|
||||
return ''
|
||||
|
@ -20,6 +20,7 @@
|
||||
|
||||
#include "rdapplication.h"
|
||||
#include "rdconf.h"
|
||||
#include "rddatetime.h"
|
||||
#include "rddb.h"
|
||||
#include "rddebug.h"
|
||||
#include "rdescape_string.h"
|
||||
@ -3186,7 +3187,7 @@ void RDLogPlay::SendNowNext()
|
||||
// Header Fields
|
||||
//
|
||||
QJsonObject jo0;
|
||||
jo0.insert("dateTime",QDateTime::currentDateTime().toString(Qt::ISODate));
|
||||
jo0.insert("dateTime",RDWriteXmlDateTime(QDateTime::currentDateTime()));
|
||||
jo0.insert("hostName",rda->station()->name());
|
||||
jo0.insert("shortHostName",rda->station()->shortName());
|
||||
jo0.insert("machine",1+play_id);
|
||||
@ -3332,7 +3333,12 @@ QJsonValue RDLogPlay::GetPadJson(const QString &name,RDLogLine *ll,
|
||||
return QJsonValue();
|
||||
}
|
||||
|
||||
jo0.insert("startDateTime",start_datetime.toString(Qt::ISODate));
|
||||
if(start_datetime.isNull()) {
|
||||
jo0.insert("startDateTime",QJsonValue());
|
||||
}
|
||||
else {
|
||||
jo0.insert("startDateTime",RDWriteXmlDateTime(start_datetime));
|
||||
}
|
||||
jo0.insert("lineNumber",line);
|
||||
jo0.insert("lineId",ll->id());
|
||||
jo0.insert("eventType",RDLogLine::typeText(ll->type()));
|
||||
|
Loading…
x
Reference in New Issue
Block a user