sectionsd: replace hardcoded timestamp with BUILT_TIMESTAMP

based upon 292cb9e8c2


Origin commit data
------------------
Branch: ni/coolstream
Commit: 8b49533d97
Author: vanhofen <vanhofen@gmx.de>
Date: 2022-01-08 (Sat, 08 Jan 2022)

Origin message was:
------------------
- sectionsd: replace hardcoded timestamp with BUILT_TIMESTAMP

based upon 292cb9e8c2


------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2022-01-08 20:27:42 +01:00
parent a213d47e6a
commit ef77adba3e
2 changed files with 6 additions and 2 deletions

View File

@@ -55,6 +55,9 @@
#include "xmlutil.h"
#include "debug.h"
// version.h is located in $(top_builddir)
#include <src/gui/version.h>
#include <compatibility.h>
#if ! HAVE_CST_HARDWARE
#include <poll.h>
@@ -1572,8 +1575,8 @@ void CTimeThread::run()
if(first_time)
sleep_time = 5;
}
/* in case of wrong TDT date, dont send time is set, 1609455600 - 01.01.2021 00:00:00 */
if(time_ntp || (dvb_time > (time_t) 1609455600)) {
/* in case of wrong TDT date, dont send time is set */
if(time_ntp || (dvb_time > (time_t) BUILT_TIMESTAMP)) {
sendTimeEvent(time_ntp, dvb_time);
debug(DEBUG_ERROR, "%s: Time set via %s, going to sleep for %d seconds.", name.c_str(),
time_ntp ? "NTP" : first_time ? "DVB (TDT)" : "DVB (TOT)", sleep_time);

View File

@@ -3,6 +3,7 @@ BUILT_SOURCES = version.h
version.h:
@rm -f $@; \
echo "#define BUILT_DATE \"$$(date)\"" > $@
echo "#define BUILT_TIMESTAMP \"$$(date +%s)\"" >> $@
@if test -d $(top_srcdir)/.git ; then \
pushd $(top_srcdir) ; \
GITTAG=$$(git tag -l "NI-*" | tail -n1); \