Docker times seem to be drifting from main system

  • Morning all.


    I am currently running TVHeadend and HomeAssistant as docker containers but have noticed that the Dockers seem to have a different time to the main system.


    As such, TVHeadend has started to miss the beginning of recordings.


    When I turn a light on, in HomeAssistant, the log on my phone says that it happened 7 minutes ago (not literally just now).


    Any advice on working out what the problem is would be very much appreciated.

  • Unfortunately, I am still having the same issue.


    TVHeadend seems to think that it is about 10 minutes earlier than it is - i.e. I set a reminder to record at 18:00 but it only starts recording at about 18:07 or 18:08.


    Could the fact I am still using Portainer be the issue, especially given that I am using version 2.18.2 and the current version is 2.19.5?


    As portainer is it self a container, I cannot work out how to update it.

  • The only info you gave is TVHeadend, HomeAssistant and docker.

    Throwing darts based on that info is tiredsome and maybe the reason why (almost) noone replied.


    Start by sharing info on what system you are running.

    This will give an idea if you have RTC or not (most SBCs don't have it so are dependent on a constant connection to NTP servers)


    After, the containers you are running:

    Are they able to use VOLUME binding to the HOST localtime or not.

    If they accept the possibility to bind the localtime from the HOST, they will be in sync.

    So, info on what exact container images and YML you are using is also a plus.


    To check if any deviation between HOST and containers exist, just run the following:

    Code
    # This will show the HOST actual Time and Date
    USER@HOST:~ $ date
    Mon Jun 17 19:17:00 WEST 2024
    
    # This will show the Time and Date as seen on the container (Nextcloud in this case) Deviation should be minimal/none
    USER@HOST:~ $ docker exec nextcloud date
    Mon Jun 17 19:17:10 WEST 2024
  • Thanks very much for the response - I am running OMV on a Beelink Mini S12 Pro.


    Code
    root@blserver:~# date
    Mon 17 Jun 19:52:09 BST 2024
    root@blserver:~# docker exec homeassistant date
    Mon Jun 17 19:52:18 BST 2024
    root@blserver:~# docker exec tvheadend date
    Mon Jun 17 19:52:28 BST 2024
    root@blserver:~#

    Interesting - I typed this in at 20:01. So my system, itself, is 9 minutes behind the actual time?

  • elsmandino

    Added the Label resolved

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!