birdman
Moderator
Which is wrong once fake-hwclock is in place, since the time will be after 2019, but will not be correct - it will be some time (hours) in the past.
- config.autobouquetsmaker.nextscheduletime is only used when shutting the box down to deep standby so it knows the next wake up time.
- 1546300800: # Tuesday, January 1, 2019 12:00:00 AM is used to detect the clock is set.
- If your hardware clock shows a time later than this point ABM will work out the next scheduled download based on that time.
Unless the scheduling doesn't take place until after enigma2 has had a chance to set the time itself (i.e. after the transponder time has had a chance to be used).
But if the original clock was wrong then the original relative time for the timer will also have been wrong (which is, I think, where this started).
- The scheduled download is a relative timer so once set it will tick down and do the download if the box is still alive at that point.
- If the clock is reset in the mean time the running timer will not be affected and continues to tick towards the same relative target point.
Why not set an absolute timer for the next download? This has more likelihood of running at the correct time if the clock needs to be corrected.
Or we could find where the clock set/check is called (needs to be for both NTP and DVB), save the wallclock time (time()) before the call and check whether the time after the call has changed by > (say) 1 minute.
- If you knew the clock had changed, calling AutoScheduleTimer.instance.doneConfiguring() will re-evaluate when the next schedule download should take place. Easy as pie.
- So in order to do anything we need a signal from the time code to inform of a clock change. Not easy, especially as the update via dvb is handled in C++. Ideas.
If so then update timers. If it is less than that then we don't really care.
