Matii
Posts: 16
Joined: Sat Jun 18, 2016 7:56 am

Re: Wrong time and date

Fri Jul 01, 2016 2:04 pm

beta-tester wrote:
SonOfAMotherlessGoat wrote:Okay, so which version of busybox?
ntp - ntpclient is a tiny ntp client. BusyBox starting from 1.16.x also acquired ntpd applet.
Do you have

Code: Select all

timedatectl
Have you asked any questions in Libre/Open's forums and have they given any hints?

Code: Select all

BusyBox v1.24.2 (2016-05-17 07:38:00 BST) multi-call binary.
BusyBox is copyrighted by many authors between 1998-2015.
Licensed under GPLv2. See source distribution for detailed
copyright notices.

Usage: busybox [function [arguments]...]
   or: busybox --list[-full]
   or: busybox --install [-s] [DIR]
   or: function [arguments]...

        BusyBox is a multi-call binary that combines many common Unix
        utilities into a single executable.  Most people will create a
        link to busybox for each function they wish to use and BusyBox
        will act like whatever it was invoked as.

Currently defined functions:
   ar, arp, arping, ash, awk, basename, bash, bunzip2, bzcat, bzip2, cat, chmod, chown, chroot, chvt, clear, cp, cpio,
   crond, crontab, cryptpw, cut, date, dd, deallocvt, df, dirname, dmesg, dnsdomainname, dos2unix, du, egrep, eject,
   env, ether-wake, fbset, fgconsole, fgrep, find, findfs, flash_eraseall, flock, free, fstrim, ftpget, ftpput, fuser, getopt,
   grep, groups, gunzip, gzip, head, hostname, httpd, hwclock, id, ifconfig, ifdown, ifplugd, ifup, install, ionice, iostat,
   ip, kill, killall, killall5, less, ln, loadkmap, logger, login, ls, lsof, md5sum, mkdir, mkdosfs, mkfifo, mkfs.vfat, mknod,
   mkpasswd, mkswap, mktemp, more, mount, mountpoint, mpstat, mv, nandwrite, nbd-client, nc, netstat, nice, nohup,
   nslookup, ntpd, od, pgrep, pidof, ping, ping6, pkill, pmap, printenv, ps, pstree, pwd, pwdx, rdate, readlink, realpath,
   renice, reset, rm, rmdir, route, sed, seq, setconsole, setserial, sh, sha1sum, sha256sum, sha512sum, sleep, smemcap,
   sort, stat, su, switch_root, sync, sysctl, tail, tar, tee, telnet, time, top, touch, tr, traceroute, traceroute6, true,
   ttysize, uevent, umount, uname, uniq, unix2dos, unxz, uptime, usleep, vconfig, vi, watch, wc, wget, which, whoami,
   whois, xargs, xz, xzcat, zcat
... even it is a higher version you showed, it does not guarantee, that all functions are implemented.
even that busybox is customized to shrink down the size of OpenELEC/LibreELEC.
i know it, because i was asking the dev team to add missing features in the past and they did it (partially)

Code: Select all

LibreELEC:~ # ls -l /bin
total 818
lrwxrwxrwx    1 root     root             7 May 17 08:40 ar -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 ash -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 awk -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 basename -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 bash -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 bunzip2 -> busybox
-rwsr-xr-x    1 root     root        515200 May 17 08:40 busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 bzcat -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 bzip2 -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 cat -> busybox
-rwxr-xr-x    1 root     root         10584 May 17 08:40 chattr
lrwxrwxrwx    1 root     root             7 May 17 08:40 chmod -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 chown -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 chvt -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 clear -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 cp -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 cpio -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 crontab -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 cryptpw -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 cut -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 date -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 dd -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 deallocvt -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 df -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 dirname -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 dmesg -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 dnsdomainname -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 dos2unix -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 du -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 egrep -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 eject -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 env -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 fgconsole -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 fgrep -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 find -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 flock -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 free -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 ftpget -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 ftpput -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 fuser -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 getopt -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 grep -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 groups -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 gunzip -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 gzip -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 head -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 hostname -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 id -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 install -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 ionice -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 iostat -> busybox
-rwxr-xr-x    1 root     root         18692 May 17 06:31 keyctl
lrwxrwxrwx    1 root     root             7 May 17 08:40 kill -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 killall -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 less -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 ln -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 logger -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 login -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 ls -> busybox
-rwxr-xr-x    1 root     root          9024 May 17 08:40 lsattr
lrwxrwxrwx    1 root     root             7 May 17 08:40 lsof -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 md5sum -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 mkdir -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 mkfifo -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 mknod -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 mkpasswd -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 mktemp -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 more -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 mount -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 mountpoint -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 mpstat -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 mv -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 nc -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 netstat -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 nice -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 nohup -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 nslookup -> busybox
-rwxr-xr-x    1 root     root        274284 May 17 10:44 ntfs-3g
lrwxrwxrwx    1 root     root             7 May 17 08:40 od -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 pgrep -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 pidof -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 ping -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 ping6 -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 pkill -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 pmap -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 printenv -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 ps -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 pstree -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 pwd -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 pwdx -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 readlink -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 realpath -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 renice -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 reset -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 rm -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 rmdir -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 sed -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 seq -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 setserial -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 sh -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 sha1sum -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 sha256sum -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 sha512sum -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 sleep -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 smemcap -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 sort -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 stat -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 su -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 sync -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 tail -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 tar -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 tee -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 telnet -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 time -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 top -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 touch -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 tr -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 traceroute -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 traceroute6 -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 true -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 ttysize -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 umount -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 uname -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 uniq -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 unix2dos -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 unxz -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 uptime -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 usleep -> busybox
-rwxr-xr-x    1 root     root          7916 May 17 08:40 uuidgen
lrwxrwxrwx    1 root     root             7 May 17 08:40 vi -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 watch -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 wc -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 wget -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 which -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 whoami -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 whois -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 xargs -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 xz -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 xzcat -> busybox
lrwxrwxrwx    1 root     root             7 May 17 08:40 zcat -> busybox
i don't thing the issue is OpenELEC/LibreELEC as long you changed anything in the settings. it is working out of the box.
the timeserver that he was using (1.cz.pool.ntp.org) is working.

my suggestion would be to put the official raspbian jessie OS to the/an SD card and see if the RPi get the correct time there. if not, it is was easier to track down the problem. because it is a "full featured" OS and the logfiles contains more information, to see, where the problem starts with.

oh, wait a moment... are you are using network cable or do you using the wifi of the RPi3?
to wifi i can not tell anything, how good it is working under OpenELEC/LibreELEC, i am using always a network cable connection.
(maybe estabishing a wifi network to the internet takes to long time and the time sync run into time out)
I am using Wifi. And I am planning on doing clean installation of rasbian. Also do you think that there might be something wrong with raspberry itself?

beta-tester
Posts: 1242
Joined: Fri Jan 04, 2013 1:57 pm
Location: de_DE

Re: Wrong time and date

Fri Jul 01, 2016 8:26 pm

Matii wrote:I am using Wifi. And I am planning on doing clean installation of rasbian. Also do you think that there might be something wrong with raspberry itself?
you think something is wrong with your hardware of your RPi? no, i can not see any hardware related reason - because your network is working in general. and because the RPi doesn't have a hardware clock for date time, it can't be broken.
you can try to use a network cabled internet connection to test, if OpenELEC will have a issue with wifi...

PS.: you can try the just released LibreELEC 7.0.2 (from 2016-06-27) , maybe it containes a fix, in case it is a software issue of the old OpenELEC 6.0.3 (from 2016-03-30)
https://libreelec.tv/download-temp/
LibreELEC is way newer atthe moment
{ I only give negative feedback }
RPi B (rev1, 256MB), B (rev2, 512MB), B+, 2B, 3B, 3B+, ZeroW, ...

Matii
Posts: 16
Joined: Sat Jun 18, 2016 7:56 am

Re: Wrong time and date

Sat Jul 02, 2016 8:16 am

beta-tester wrote:
Matii wrote:I am using Wifi. And I am planning on doing clean installation of rasbian. Also do you think that there might be something wrong with raspberry itself?
you think something is wrong with your hardware of your RPi? no, i can not see any hardware related reason - because your network is working in general. and because the RPi doesn't have a hardware clock for date time, it can't be broken.
you can try to use a network cabled internet connection to test, if OpenELEC will have a issue with wifi...

PS.: you can try the just released LibreELEC 7.0.2 (from 2016-06-27) , maybe it containes a fix, in case it is a software issue of the old OpenELEC 6.0.3 (from 2016-03-30)
https://libreelec.tv/download-temp/
LibreELEC is way newer atthe moment
I already tried it with wired connection but it was the same. I thought about going to libre from open but I am yet to read something about differences between these two.

beta-tester
Posts: 1242
Joined: Fri Jan 04, 2013 1:57 pm
Location: de_DE

Re: Wrong time and date

Sun Jul 03, 2016 7:53 pm

Matii wrote:I thought about going to libre from open but I am yet to read something about differences between these two.
what differences - you mean features?
do you absolutely need those differenct features that keeps you sticking to OpenELEC?
as long as i know id LibreELEC a fork of OpenELEC. the main part of developer team changed from OpenELEC to LibreELEC, that is the reason, why LibreELEC is currently more newer and has a newer version of Kodi and newer kernel. OpenELEC is not updated sins a "long" time. possibly some fixes are still remaining.
so i highly recommend to give LibreELEC a try, before you reject it.
{ I only give negative feedback }
RPi B (rev1, 256MB), B (rev2, 512MB), B+, 2B, 3B, 3B+, ZeroW, ...

lerner
Posts: 507
Joined: Sun Mar 29, 2015 12:12 am

Re: Wrong time and date

Sun Jul 03, 2016 10:36 pm

Did you ever get it working?

I have OPENELEC and it works fine.

Matii
Posts: 16
Joined: Sat Jun 18, 2016 7:56 am

Re: Wrong time and date

Mon Jul 04, 2016 11:47 am

beta-tester wrote:
Matii wrote:I thought about going to libre from open but I am yet to read something about differences between these two.
what differences - you mean features?
do you absolutely need those differenct features that keeps you sticking to OpenELEC?
as long as i know id LibreELEC a fork of OpenELEC. the main part of developer team changed from OpenELEC to LibreELEC, that is the reason, why LibreELEC is currently more newer and has a newer version of Kodi and newer kernel. OpenELEC is not updated sins a "long" time. possibly some fixes are still remaining.
so i highly recommend to give LibreELEC a try, before you reject it.
I just dont wanna switch and install and set up everything again (it does not that long but I am a lazy person). And then I dont wanna switch back to open.

Matii
Posts: 16
Joined: Sat Jun 18, 2016 7:56 am

Re: Wrong time and date

Mon Jul 04, 2016 1:21 pm

Matii wrote:
beta-tester wrote:
Matii wrote:I thought about going to libre from open but I am yet to read something about differences between these two.
what differences - you mean features?
do you absolutely need those differenct features that keeps you sticking to OpenELEC?
as long as i know id LibreELEC a fork of OpenELEC. the main part of developer team changed from OpenELEC to LibreELEC, that is the reason, why LibreELEC is currently more newer and has a newer version of Kodi and newer kernel. OpenELEC is not updated sins a "long" time. possibly some fixes are still remaining.
so i highly recommend to give LibreELEC a try, before you reject it.
I just dont wanna switch and install and set up everything again (it does not that long but I am a lazy person). And then I dont wanna switch back to open.
Well I did it. I switched from open to libre. Time is once again an issue. I does not say 1970 anymore but 22. june 2016 better but still a problem. It always reserts to the same date everytime I restart or shutdown.

beta-tester
Posts: 1242
Joined: Fri Jan 04, 2013 1:57 pm
Location: de_DE

Re: Wrong time and date

Mon Jul 04, 2016 8:03 pm

Matii wrote:Well I did it. I switched from open to libre. Time is once again an issue. I does not say 1970 anymore but 22. june 2016 better but still a problem. It always reserts to the same date everytime I restart or shutdown.
2016-06-22 is possibly the date time of the last shutdown of the distro, before they generated the LibreELEC package (normally that last timestamp will be removed before making a package, then the time starts from 1970 in case no time server is reachable).
so, i am pretty sure that you don't get a proper connection to any time server.
then i guess you have to install raspbian to possibly get more details from the logfiles about the problem, why you don't get a sync with the time server.
this is the only chance to get moder details.
other ideas i don't have... sorry.
{ I only give negative feedback }
RPi B (rev1, 256MB), B (rev2, 512MB), B+, 2B, 3B, 3B+, ZeroW, ...

lerner
Posts: 507
Joined: Sun Mar 29, 2015 12:12 am

Re: Wrong time and date

Mon Jul 04, 2016 9:05 pm

I dont know the tech terms, but.....

Unix ,etc have a "day zero" to which ghey default to if no RTC.

I have heard mention of a new "day zero" for linux. So maybe the pi has it too?

I could be wrong.

Matii
Posts: 16
Joined: Sat Jun 18, 2016 7:56 am

Re: Wrong time and date

Tue Jul 05, 2016 9:24 pm

lerner wrote:I dont know the tech terms, but.....

Unix ,etc have a "day zero" to which ghey default to if no RTC.

I have heard mention of a new "day zero" for linux. So maybe the pi has it too?

I could be wrong.
Yea I also read about thit that time and date resets to default date and time that is set by the system. I also think that the date could be the date they released the newest version of libreelec. I also think that there might be trouble with my router and is blocking some ports.

FlexibleSigmoid
Posts: 61
Joined: Sun Jul 03, 2016 1:33 am

Re: Wrong time and date

Tue Jul 05, 2016 9:32 pm

It's called The Epoch, and if the time is resetting back to epoch or another constant date it sounds like there may be issues with fake-hwclock. Does your distro have that package available, and is there a read-only filesystem set up that may block the fake-hwclock package from working?

Matii
Posts: 16
Joined: Sat Jun 18, 2016 7:56 am

Re: Wrong time and date

Thu Jul 07, 2016 4:32 pm

FlexibleSigmoid wrote:It's called The Epoch, and if the time is resetting back to epoch or another constant date it sounds like there may be issues with fake-hwclock. Does your distro have that package available, and is there a read-only filesystem set up that may block the fake-hwclock package from working?
Well libre and open work only as Read-Only filesystem. How do I check If its available?

FlexibleSigmoid
Posts: 61
Joined: Sun Jul 03, 2016 1:33 am

Re: Wrong time and date

Thu Jul 07, 2016 6:41 pm

Basically, fake-hwclock replicates a real hwclock through a file. At shutdown, it writes the current time to a file, and upon bootup, it reads that time from the same file and sets the system clock to be that time. So your boot times shouldn't reset back to epoch, but the approximately the time you shut down the system. It's a reasonable approximation.

I don't have an install available to do more research, but a quick check of the package turned up this manpage that may be of some more help and detail: http://manpages.ubuntu.com/manpages/tru ... ock.8.html

User avatar
davidcoton
Posts: 4195
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: Wrong time and date

Thu Jul 07, 2016 7:43 pm

FlexibleSigmoid wrote:Basically, fake-hwclock replicates a real hwclock through a file. At shutdown, it writes the current time to a file, and upon bootup, it reads that time from the same file and sets the system clock to be that time. So your boot times shouldn't reset back to epoch, but the approximately the time you shut down the system. It's a reasonable approximation.
Matii wrote: Well libre and open work only as Read-Only filesystem.
So fake-hw clock is not going to work on a read-only file system. Really that's something the *elec OSs need to sort out for the Pi (until we get a Pi X with real hardware RTC). It probably doesn't affect hardware that does have a real hw RTC.
Signature retired

beta-tester
Posts: 1242
Joined: Fri Jan 04, 2013 1:57 pm
Location: de_DE

Re: Wrong time and date

Thu Jul 07, 2016 8:09 pm

D'OH...! :roll: :x
somebody should add something to the thread's title, that we are talk about OpenELEC/LibreELEC here...
a read-only filesystem is absolute normal here and time synchronization is not an issue under normal conditions.
sync with time servers is working well on LibreELEC and OpenELEC on my RPi with internet cable.
so the distro itself can not be the problem.
also it was talked about, that internet in general is working. but even with internet cable (instead of wifi) does not solve the problem that the author has.
so why talking about read-only filesystems and complaining tools that ___ELEC not had, when it is working for the thousands of other users of the distro out of the box?

i only see he problem in the network (router/provider/time-server) or the time-server-settings.

OK. i stop talking now on this thread...
{ I only give negative feedback }
RPi B (rev1, 256MB), B (rev2, 512MB), B+, 2B, 3B, 3B+, ZeroW, ...

User avatar
davidcoton
Posts: 4195
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK

Re: Wrong time and date

Thu Jul 07, 2016 8:22 pm

beta-tester wrote:i only see he problem in the network (router/provider/time-server) or the time-server-settings.
Agreed. It is only saving the fake-hwclock time of shutdown that will fail (which will, therefore, make it look like the clock goes backwards, which may cause other issues with the FS). AFAIK the clock should successfully re-sync to an internet time server on reboot. I have no idea why it doesn't.

And yes, it would help if the thread title specified the OS.
Signature retired

chuchesaku
Posts: 4
Joined: Mon Aug 08, 2016 5:45 pm

Re: Wrong time and date

Mon Aug 08, 2016 5:56 pm

Hi all,

i have the exact same problem. Rpi3,LIBREelec 7.0.2 and the clock never shows the right time when on wireless. It's funny because as I plug in the lan cable in the eth port,the time synchronizes. It doesn't even take a second,it happens right away. Could it be something with the firewall and the ntp traffic not passing through?
I'm a noob so I'm just guessing...

lerner
Posts: 507
Joined: Sun Mar 29, 2015 12:12 am

Re: Wrong time and date

Tue Aug 09, 2016 11:34 pm

(Cringe) I hate to mention this, but to all those who have the problem:

You REALLY need to find out WHERE the problem is.

Get the machine up and running.
Get another machine up and running too... Yeah, I too have difficulty doing that as I only have 1 HDMI monitor. Use a PC/Laptop.
On THAT machine, ensure you can get the right time from a ntp server.
If you can't do that, then you need to fix that before going any further.
If you can, then it gets interesting.
SSH to the "XMBC" (as I shall call it for simplicity) and see if you can access the ntp server from there.

You will need to do this and then post the results.

Until that is done, you are really just procrastinating on fixing the problem.

These things really need to be checked and proven to be working before ANY real choices can be made.

chuchesaku
Posts: 4
Joined: Mon Aug 08, 2016 5:45 pm

Re: Wrong time and date

Wed Aug 10, 2016 3:58 pm

tnx @lerner for this. so i did like you suggested and here are the results:

the Pi3 connected to wlan:

Code: Select all

raspberryPI3:~ # ntpd -p 193.2.4.2 -w
ntpd: timed out waiting for 193.2.4.2, reach 0x00, next query in 1s
ntpd: timed out waiting for 193.2.4.2, reach 0x00, next query in 2s
the moment I plug in the lan cable:

Code: Select all

ntpd: reply from 193.2.4.2: offset:-0.150776 delay:0.027514 status:0x24 strat:2 refid:0x9824458b rootdelay:0.000504 reach:0x01
ntpd: reply from 193.2.4.2: offset:-0.154374 delay:0.016069 status:0x24 strat:2 refid:0x9824458b rootdelay:0.000504 reach:0x03
ntpd: reply from 193.2.4.2: offset:-0.137999 delay:0.050805 status:0x24 strat:2 refid:0x9824458b rootdelay:0.000504 reach:0x07
my knowledge on networking ends here. But I still suspect the firewall...
any suggestions?

ps: the PI3 is online, I can also successfully ping the same ntp server.

milhouse
Posts: 641
Joined: Mon Jan 16, 2012 12:59 pm

Re: Wrong time and date

Fri Aug 12, 2016 4:31 am

The problem with setting the time over WiFi using ntp isn't specific to LibreELEC. It appears to be an issue with the RPi3 WLAN driver, issue #1519 and likely affects all distributions.

All versions of LibreELEC will set the system clock to the date of the release on startup, as explained here. If ntp is unable to set an accurate system date/time then you're left with the clock being set to the release date/time whenever you boot.

LibreELEC does not support fake-hwclock.

chuchesaku
Posts: 4
Joined: Mon Aug 08, 2016 5:45 pm

Re: Wrong time and date

Fri Aug 12, 2016 2:30 pm

:? Reminds me of Microsoft's way of doing things and releasing stuff even if it's not working as it should.
I mean, come on... time sync? It's 2016 and unfortunately most of the devices and services require the correct time to work properly....
A basic problem (which to me is pretty big of a problem): Vimeo addon won't play because my berry is stuck in the past...
This should be fixed as soon as it can be...

thank you @milhouse for the explanation and links

tinca
Posts: 1
Joined: Fri Aug 25, 2017 8:01 am

Re: Wrong time and date

Fri Aug 25, 2017 8:26 am

milhouse wrote:
Fri Aug 12, 2016 4:31 am
The problem with setting the time over WiFi using ntp isn't specific to LibreELEC. It appears to be an issue with the RPi3 WLAN driver, issue #1519 and likely affects all distributions.

All versions of LibreELEC will set the system clock to the date of the release on startup, as explained here. If ntp is unable to set an accurate system date/time then you're left with the clock being set to the release date/time whenever you boot.

LibreELEC does not support fake-hwclock.
This post and the few previous ones gave me a clue how to solve my exact same problem.
I have Pi0 with external dongle from Pimoroni and LibreELEC 8.0.2 installed on it. I used it with two TP-Link routers. The time with could be set the first one with three antennas (I do not know the exact type by heart) by applying the expected procedure (set ntp server and timezone). Then moved the system under a TP-Link WR543G where time/date immeadiately was set to the mentioned release date.
I tried everything, finally found that no ntp query could go out despite the ntp server being pingable.

Then, seeing that it probably a driver issue, updated to LE 8.1.0 beta, which immediately solved the problem.

Hope this exőerience can help others or at least points to that direction.

lerner
Posts: 507
Joined: Sun Mar 29, 2015 12:12 am

Re: Wrong time and date

Sun Sep 03, 2017 9:24 pm

chuchesaku wrote:
Wed Aug 10, 2016 3:58 pm
tnx @lerner for this. so i did like you suggested and here are the results:

the Pi3 connected to wlan:

Code: Select all

raspberryPI3:~ # ntpd -p 193.2.4.2 -w
ntpd: timed out waiting for 193.2.4.2, reach 0x00, next query in 1s
ntpd: timed out waiting for 193.2.4.2, reach 0x00, next query in 2s
the moment I plug in the lan cable:

Code: Select all

ntpd: reply from 193.2.4.2: offset:-0.150776 delay:0.027514 status:0x24 strat:2 refid:0x9824458b rootdelay:0.000504 reach:0x01
ntpd: reply from 193.2.4.2: offset:-0.154374 delay:0.016069 status:0x24 strat:2 refid:0x9824458b rootdelay:0.000504 reach:0x03
ntpd: reply from 193.2.4.2: offset:-0.137999 delay:0.050805 status:0x24 strat:2 refid:0x9824458b rootdelay:0.000504 reach:0x07
my knowledge on networking ends here. But I still suspect the firewall...
any suggestions?

ps: the PI3 is online, I can also successfully ping the same ntp server.

So sorry for the long gap in replying.

If you are still having this problem here are some things I have since discovered:
(And just to re-cap on what it is you have)

You have XBMC (which ever version/) running.
193.2.4.2 is your NTP machine.

Go to another RPI and check its ntp.conf file. (/etc/ntp.conf)
This is to check that pi uses your NTP server to get the time.
Then try this command from a shell in the first Pi.:

Code: Select all

ntpq -p 193.2.4.2
If it comes back with the same errors as you posted, then try this:

SSH into your NTP machine and type:

Code: Select all

sudo systemctl restart ntp.service
and see what happens when you do the ntpq -p 193.2.4.2 again.

If that works, it is that your NTP server is getting stuck, and the restart is getting it working.

I got around that (my NTP server is on 24.7) by simply SSH'ing to it and restarting the server and all is a source of joy.

I am/was having problems with my NTP machine too. Thread here:
viewtopic.php?f=91&t=190785&p=1206367#p1206367

Good luck.
P.S. Just checked and I have the tickbox set to tell me about replies, yet I don't remember getting any notification.
Last edited by lerner on Sun Sep 03, 2017 9:36 pm, edited 1 time in total.

SurferTim
Posts: 1769
Joined: Sat Sep 14, 2013 9:27 am
Location: Miramar Beach, Florida

Re: Wrong time and date

Sun Sep 03, 2017 9:26 pm

I believe the NTP over wifi has been fixed if you run

Code: Select all

 sudo rpi-update

Return to “Troubleshooting”