Datetime Not Updating ?? only via ssh

  • Hello,

    I installed the latest LibreELEC version downloaded from this website.

    I used the SD card tool to write the OS into the card.

    I booted up the the rpi4 and everything came up good.

    I went through the startup "wizard" and connected the rpi to my wifi.

    The date-time is off.

    I set the correct timezone to my location.

    I rebooted the rpi.

    Datetime is still off.


    Updates don't run as the datetime is set to I believe February 02, 2021 11:30am on every reboot.

    I can hack around it by ssh into the rpi, and running $date -s '2021-08-03 18:43:00'

    Then everything is good, and the updates run.

    I thought I might have something misconfigured in my wifi network (which is still a possibility).

    Yet I tested that out by installing a fresh Raspbian (raspberry OS?) image into the same sd card.

    Booted the same rpi, and that raspbian install picked up the datetime perfectly.


    Any ideas what could be going on?

    How could I fix this?

    Thank you!

  • The RPi has no CMOS battery, so it needs the internet connection to get the correct time at boot.

    Enable the "Wait for network" option in the LibreELEC Settings add-on, and set it to 30 secs or so.

  • Klojum,

    Thank you for the help!

    I did try that.

    I set:

    System --> Network --> Advanced Network Settings --> Wait for Network -ON POSITION-

    I then set the wait time for 60 seconds.

    Yet when I reboot, same thing happens.

    Time goes back to 11:30am.

    I also made sure to point the NTP Servers to two entries:

    #0 - 192.168.17.1 (my local router, which has a NTP server service running)

    #1 - 0.pool.ntp.org

    Yet still time is set to 11:30am upon a reboot.

    I do see a possibility that my network is not properly configured.

    Do you have any idea of what logs I could check (via ssh?) in the LibreELEC rpi?

    Logs might bring more light into this!

    Thank you for your help Klojum, very much appreciate it!!

  • Our default config uses pool.ntp.org servers so you do not need to configure anything for NTP to work; assuming your network or your ISP does not obstruct the normal process. ISP blocking sounds dumb, but appears to happen more often than you'd realise.

    Clean boot, wait 2 minutes, then "journalctl | paste" and share the URL here so we can see what the system actually does.

  • Did you enter the correct Region and Timezone country in the Settings/Interface/Regional/Unit Formats section in the Kodi GUI?

    Yes Sir.

    I went Settings --> Interface --> Regional --> Unit Formats --> Timezone country: SET TO "Puerto Rico"

    That sets the Timezone to "America/Puerto_Rico".

    This is where I am located.


    ==========================

    Quote

    Our default config uses pool.ntp.org servers so you do not need to configure anything for NTP to work; assuming your network or your ISP does not obstruct the normal process. ISP blocking sounds dumb, but appears to happen more often than you'd realise.

    Clean boot, wait 2 minutes, then "journalctl | paste" and share the URL here so we can see what the system actually does.

    Ok, with an uptime of six (6) minutes, I have the following copy/paste from journcalctl.

    http://ix.io/3v0Z


    What do you make of it?

    Thank you!

  • Code
    Feb 02 11:32:27 koditv1 wpa_supplicant[513]: wlan0: CTRL-EVENT-REGDOM-CHANGE init=USER type=COUNTRY alpha2=PR

    Did you set your wireless regulatory domain in LE Settings Addon?

  • Code
    Feb 02 11:32:27 koditv1 wpa_supplicant[513]: wlan0: CTRL-EVENT-REGDOM-CHANGE init=USER type=COUNTRY alpha2=PR

    Did you set your wireless regulatory domain in LE Settings Addon?

    I think so.

    In the System menu (the menu with the big square icons), I go:

    System --> LibreELEC --> Network --> Wireless Networks --> Wireless Regulatory Domain --> Puerto Rico (PR)

    I also tried with:

    System --> LibreELEC --> Network --> Wireless Networks --> Wireless Regulatory Domain --> United States (US)

    Yet both settings, after reboot, I still get a time of 11:30am.

    ===

    If I manually set the datetime via ssh, LibreELEC does its updates just fine.

    Apparently the time-delta is not that big, and it hums along.

    Any thoughts on what else I can check/try?

    Thank you very much for your help!!

  • ^ Is "IntelPrintServer" the correct SSID? .. print server hotspots are normally private (access to printer only) and not internet routable. I see no attempt by ConnMan to contact an NTP server, and if there is/was it would be logged.

    I'd clean install to remove all current network config and start again.

  • I've had this issue, tried all the good stuff suggested by the LE team above, couldn't get it working. Think it might be related to a connman bug.

    In short, using option 42 on your DHCP server to provide ntp server IP adress(es) should fix it, but if you can't configure your router then you could try 'systemctl edit connman.service' and use the following (DHCP option 42 and this is working for me anyway, YMMV):

    NB I use LogLevelMax to reduce entries from connman in the system journal, you might want to comment this out so you can see the ntp logging to check it's working.

    If you don't reboot afterwards you'll need to systemctl daemon-reload and systemctl restart connman to see if it works.

    Cheers,

    S

    Edited once, last by sihy (August 7, 2021 at 12:54 PM).

  • The "IntelPrintServer" SSID is actually a regular Mikrotik router/AP.

    I gave it that name to minimize interest in it.

    I will get additional information and post back ASAP.

    Thank you everyone!

  • To prove/disprove whether it's a connman bug someone needs to generate debug output so it can be shared with the connman devs for their investigation. Definitely a case of "No log, No problem" ..

    Can you help me out as to how to provide the debug log for connman?

    I want to help out... yet quite lost as to how to create that log file.

  • I just tried this... and rebooted the rpi.

    Yet no dice... still wrong date with February 2 2021 11:30:00am

  • I'd clean install to remove all current network config and start again.

    I tried this... and still same thing.

    Took the microSD card out... re-copied the LibreELEC into the card.

    Booted up. Connected to my wifi... and still same thing.

    Still giving wrong date with Feb 2 2021 11:30:00

  • Ok UPDATE:

    I have something wrong on my Mikrotik configuration(s).

    For testing, I disconnected the rpi LibreELEC from my Mikrotik wifi.

    I then setup a "wifi hotspot" with my Android phone.

    I connected the rpi LibreELEC to my android phone via wifi and IMMEDIATELY the date/time was corrected.

    I'll see what I have on my Mikrotik wrong, and update this thread for other future travelers.

    Thank you for everyone's patience.

    Will update shortly!