diff --git a/src/eitd/sectionsd.cpp b/src/eitd/sectionsd.cpp index ab16d27a4..b3a5a64bf 100644 --- a/src/eitd/sectionsd.cpp +++ b/src/eitd/sectionsd.cpp @@ -55,6 +55,9 @@ #include "xmlutil.h" #include "debug.h" +// version.h is located in $(top_builddir) +#include + #include #if ! HAVE_CST_HARDWARE #include @@ -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); diff --git a/src/gui/Makefile.am b/src/gui/Makefile.am index 8803ae864..ed044527a 100644 --- a/src/gui/Makefile.am +++ b/src/gui/Makefile.am @@ -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); \