mirror of
https://github.com/ElvishArtisan/rivendell.git
synced 2026-01-11 23:25:57 +01:00
2018-12-05 Fred Gleason <fredg@paravelsystems.com>
* Added a set of Python classes for processing PAD updates.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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));
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user