2018-12-05 Fred Gleason <fredg@paravelsystems.com>

* Added a set of Python classes for processing PAD updates.
This commit is contained in:
Fred Gleason
2018-12-05 20:15:10 -05:00
parent fc0023a0cd
commit 1d8e303101
12 changed files with 356 additions and 4 deletions

View File

@@ -991,7 +991,15 @@ int RDTimeZoneOffset()
tm=gmtime(&t);
time_t gmt_time=3600*tm->tm_hour+60*tm->tm_min+tm->tm_sec;
return gmt_time-local_time;
int offset=gmt_time-local_time;
if(offset>43200) {
offset=offset-86400;
}
if(offset<-43200) {
offset=offset+86400;
}
return offset;
}

View File

@@ -2964,7 +2964,7 @@ void RDLogPlay::SendNowNext()
play_pad_socket->write(QString("{\r\n").toUtf8());
play_pad_socket->write(QString(" \"padUpdate\": {\r\n").toUtf8());
play_pad_socket->write(RDJsonField("dateTime",QDateTime::currentDateTime(),8).toUtf8());
play_pad_socket->write(RDJsonField("logMachine",play_id,8));
play_pad_socket->write(RDJsonField("logMachine",play_id+1,8));
play_pad_socket->write(RDJsonField("onairFlag",play_onair_flag,8));
play_pad_socket->write(RDJsonField("logMode",RDAirPlayConf::logModeText(play_op_mode),8));

View File

@@ -1213,7 +1213,7 @@ QString RDWebDateTime(const QDateTime &datetime)
tzstr="GMT";
}
return RDLocalToUtc(datetime).toString("ddd, dd MMM yyyy hh:mm:ss")+" "+tzstr;
return datetime.toString("ddd, dd MMM yyyy hh:mm:ss")+" "+tzstr;
}