eDVBLocalTimeHandler does not set correct time for ahead time

  • Nobody answers my question in solved thread [solved] Wrong system time, how to get the correct time again
    so I create ne one to report this problem:
    To reproduce:
    1. Switch to transponder with broken time from the future (e.g. now on 9E 11804/V/27500, time is resync about 20 min)
    2. Dreambox synchronizes bad time what is not problem yet :)
    3. But then switch to channel with correct time and you get: (journalctl -f -u enigma2 | grep eDVBLocalTimeHandler)


    Code
    cze 07 18:09:27 dm520 enigma2[176]: [eDVBLocalTimeHandler] Receiver time is 'Thu Jun 7 18:28:06 2018'
    cze 07 18:28:06 dm520 enigma2[176]: [eDVBLocalTimeHandler] Transponder time is 'Thu Jun 7 18:07:12 2018'
    cze 07 18:28:06 dm520 enigma2[176]: [eDVBLocalTimeHandler] diff is -1254
    cze 07 18:28:06 dm520 enigma2[176]: [eDVBLocalTimeHandler] we have correction 135
    cze 07 18:28:06 dm520 enigma2[176]: [eDVBLocalTimeHandler] diff after add correction is -1119
    cze 07 18:28:06 dm520 enigma2[176]: [eDVBLocalTimeHandler] use stored correction(<5 min)
    cze 07 18:28:06 dm520 enigma2[176]: [eDVBLocalTimeHandler] update RTC
    cze 07 18:28:06 dm520 enigma2[176]: [eDVBLocalTimeHandler] time_difference is -1119
    cze 07 18:28:06 dm520 enigma2[176]: [eDVBLocalTimeHandler] update Linux Time

    Expected:
    Time is fixed to correct time.
    Actual:
    No time fix -Time is wrong!



    Even after restart of DM there is the same behaviour, only switching off power for several seconds resets time to 1.1.1970 and then time is fill in properly.
    Can anyone fix it or give at least any workaround to reset to corect time, please. (NTP on/off did not change anything).

  • That's not a bug but expected behaviour. It's not accepting time sync if the diff is too high (>5min) to the current system time.
    And E2 is not syncing time if it is 20min out of sync in future. ;)

  • If you want to use ONLY NTP then NTP on/off will be useless until you put use Transponder time Setting to false


    config.misc.useTransponderTime=false


    ... Maybe ... somebody ... could produce a small patch so that you can choose there on/off/only and then both (!) Parameters are set correctly


    This would be only 3 lines of Code and would save us a lot of time not to explain this all over again and again ...

    Edited once, last by Lost in Translation ().

  • Thank you for response.

    That's not a bug but expected behaviour. It's not accepting time sync if the diff is too high (>5min) to the current system time.
    And E2 is not syncing time if it is 20min out of sync in future. ;)

    Ok, but why E2 allows to resync time > 5min?
    So its a feature to have resync time and can't sync it? I hope not :)

    I was trying this earlier too :)
    config.misc.useTransponderTime.value=false and config.misc.useTransponderTime=false


    I thought the second one which was mention earlier here when I search is correct, but nevermind. I put both via shell vim editor (plus ntp on) and nothing happend, so how long I should wait? or maybe something else? I even restarted DM and sadly then in /etc/enigma2/settings both lines were removed :/ The same if I sending it via DreamboxEdit, these lines never even can be see in setting file. Please corect me if I doing something wrong :)

  • first the .value was just a cut and paste error from e2 python code and second you have to stop e2 with systemctl stop enigma2 before editing or e2 will overwrite it from his cache when restarting next and hence never use it.

  • Thank you for response.

    Ok, but why E2 allows to resync time > 5min?So its a feature to have resync time and can't sync it? I hope not :)

    Ok seems you didn't understand. It doesn't sync time at all if the difference is larger than 5 minutes.
    Not to future and not to the past...
    It's just not possible that it sync a time with 20min difference. Maybe you switched to different transponders which all had a offset <+5min. Which results in increasing again and again.

  • first the .value was just a cut and paste error from e2 python code and second you have to stop e2 with systemctl stop enigma2 before editing or e2 will overwrite it from his cache when restarting next and hence never use it.

    Sure, thx I will try it next time :)


    Ok seems you didn't understand. It doesn't sync time at all if the difference is larger than 5 minutes.Not to future and not to the past...
    It's just not possible that it sync a time with 20min difference. Maybe you switched to different transponders which all had a offset <+5min. Which results in increasing again and again.

    I can't provide log because it looks they fixed time on 9E transponder a moment ago but I will track this issue and try to catch E2 logs while time is changing since I notice this problem myself from time to time.
    I'm pretty sure it's not true (about <5 min) or someting else caouses bigger resync because I had many time even bigger time resync e.g. about a day(!) so what I would have to do to achive that :D


    So, for now thank you for your help. Please do not close this thread as I will looking for more details of this problem.

  • Ich häng mich mal hier ran, weil meine 920 aktuell auch irgendein Problem mit der Zeit hat:


    Die lokale Zeit der 920 ist falsch, die Transponder Zeit ist richtig, wird aber trotz passender Differenz anscheinend nicht länger als einen Moment übernommen.


    Es ist das aktuelle Unstable vom Mai, config.misc.useTransponderTime ist auf true.

  • @Reichi @Ghost Habt ihr das Thema auf dem Schirm oder ist das in der Hitze des Sommers untergegangen? ;)


    Einzig nachdem ich die Box stromlos gemacht habe, wurde die Zeit vom Transponder einmalig verwendet.
    Nur, ab dann läuft sie wieder auseinander und die Transponderzeit wird nicht länger als einen Moment übernommen:

  • It takes me some time to find it but I've finally got it . DM time changed 30 min ahead but it shouldn't as it's wrong transponder time!

    Code
    sie 26 20:15:05 dm520 enigma2[190]: [eDVBLocalTimeHandler] Receiver time is 'Sun Aug 26 20:15:05 2018'
    sie 26 20:15:05 dm520 enigma2[190]: [eDVBLocalTimeHandler] Transponder time is 'Sun Aug 26 20:50:45 2018'
    sie 26 20:15:05 dm520 enigma2[190]: [eDVBLocalTimeHandler] diff is 2140
    sie 26 20:15:05 dm520 enigma2[190]: [eDVBLocalTimeHandler] we have correction -228
    sie 26 20:15:05 dm520 enigma2[190]: [eDVBLocalTimeHandler] diff after add correction is 1912
    sie 26 20:15:05 dm520 enigma2[190]: [eDVBLocalTimeHandler] use stored correction(<5 min)
    sie 26 20:46:57 dm520 enigma2[190]: [eDVBLocalTimeHandler] update RTC
    sie 26 20:46:57 dm520 enigma2[190]: [eDVBLocalTimeHandler] time_difference is 1912
    sie 26 20:46:57 dm520 enigma2[190]: [eDVBLocalTimeHandler] update Linux Time

    I think it's correction issue if there is no exception of earlier explanations for correction > 5 min. Please explain or fix it :)
    I can provide full journal log if necessery, but I guess above code contains a clue.
    Thaank you.

  • mir ist da ein Plugin über den Weg gelaufen (SetClock), die Zeit lässt sich einstellen (manuell, per Internet) und wird nicht von Enigma2 rückgesetzt, den eDVBLocalTimeHandler scheint es ausser Kraft zu setzen, Source habe ich hier gefunden
    https://pastebin.com/2vgJ604d , laut dem Timeraufruf keine DreamOS Version, mann kann es aber anpassen
    eine ältere DreamOS Version ohne Internet Synchronisierund gibt's hier
    https://pastebin.com/R0W2tjxb
    mal zum Testen, ein Transponder der verkehrte Zeit anzeigt, sage und schreibe 1h10min hinkt die Zeit nach, es sind alle Sender auf dem Transponder betroffen, startet man die Box mit dem einen Sender hat man die falsche Zeit
    Eutelsat 16, 11303H,30000, 2/3 8PSK

  • if you want to use such transponders you simply should disable transponder time and switch to ntp completely. The necessary fixes I posted already weeks ago, either you take them from board or you wait until they show up in DreamOS

  • @gutemine Thank you once again - I've just switch to not use transponders time as you recomended, but I hope it's only workaround and someone can fix this issue :) Maybe @dhwz will look at it again with my latest update.


    Back to ntp: it looks (in journal enigma2 log) that TimeHandler do not catch time from transponders now what it's better but I set ntp to auto, restart dreambox (not hard reset) and waiting about 1 hour now and time is not changed to correct (network is ok) - still 30 min ahead. How often ntp should update time? I do not see any messages related to ntp in jounal log too.

  • Thank you, with that feature it realy fixed my time!


    Still hope some Dreambox developer will look at my update in #post198652 and fix main issue :)

  • The necessary fixes I posted already weeks ago, either you take them from board or you wait until they show up in DreamOS

    But the main issue remains: The correct time is not really applied to the system!


    Code
    Aug 27 20:41:28 dm920 enigma2[286]: action -> OkCancelActions ok
    Aug 27 20:41:28 dm920 enigma2[286]: create buffer for widget 1920 x 1080
    Aug 27 20:41:28 dm920 connmand.real[273]: ntp: time slew -11.625535 s
    Aug 27 20:41:17 dm920 systemd[1]: Time has been changed
    Aug 27 20:41:28 dm920 systemd[1]: Time has been changed
    Aug 27 20:41:28 dm920 enigma2[286]: child has terminated
    Aug 27 20:41:28 dm920 enigma2[286]: pipes closed
    Aug 27 20:41:28 dm920 enigma2[286]: poll: unhandled POLLERR/HUP/NVAL for fd 289(16)

    ?(