Time and Date Do not Update



  • Hello,
    I’m building my first mirror, and I’m having trouble with the time and date. I followed the installation instructions very closely, and everything was working at first. However, I realized that when I shut everything down and turned it on a few days earlier, the system date and time started from right where they left off (right now I’m about 6 days behind). I’ve read through a few forums and haven’t gotten it to work. I realize this is not a Magic Mirror question, but more of a RPi system question.

    -I definitely have the correct time zone, region, etc. This does not correct anything if I’m off.
    -The time updates when I do this: "sudo date -s “Thu Aug 9 21:31:26 UTC 2012"” but then does not update if the pi is turned off and on again.
    -I’m connected through my wifi- not an ethernet cable.
    -I’ve also tried this since it’s been suggested:

    //sudo /etc/init.d/ntp stop
    //sudo /etc/init.d/ntp start
    

    This is probably a rather simple fix, but I’m new to this. Any help is appreciated.

    Thanks!



  • Does anyone have any advice?


  • Module Developer

    @hall1458 said in Time and Date Do not Update:

    Does anyone have any advice?

    Since you’ve been waiting for 17 days for help, then perhaps you’ll spend the time to start from scratch. Wipe your SD card, get a new raspbian image and install that. You shouldn’t have to run any commands for your time and date to work properly, other than setting it initially.

    Just my 2 cents



  • @hall1458 Wow. Dude, I’m sorry that nobody has stepped in to help you out. I’m not much of a *nix guy, but I’ve been dealing with this at work for various reasons. I’ll do what I can.

    The NTP service should synchronize your Pi’s clock with one of many time servers out on the internet. If you get a terminal onto your Pi and type ps ax | grep ntpd you should see this line in return: 602 ? Ss 0:04 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 106:111. Some parts will be different. This is good. If all you see is grep --color=auto ntp then the NTP service isn’t running. Post back here and we’ll get that fixed.

    Assuming that NTP is running on your pi, you will want to check the configuration of your NTP server. Type nano /etc/ntp.conf. If you see a blank screen/file, then you have a problem. Assuming you do see a file, you want to look for the following lines:

    # pool: 
    server 0.debian.pool.ntp.org iburst
    server 1.debian.pool.ntp.org iburst
    server 2.debian.pool.ntp.org iburst
    server 3.debian.pool.ntp.org iburst
    

    These are the servers that your Pi will be checking for a valid time. You can manually check them as well. Exit the /etc/ntp.conf file and type ntpq -pn and wait. You should see something like this:

         remote           refid      st t when poll reach   delay   offset  jitter
    ==============================================================================
    +173.71.73.207   .PPS.            1 u  856 1024  377   18.624   -1.660   5.766
    +66.228.59.187   128.59.0.245     2 u  468 1024  377   27.636    0.276   6.356
    *199.102.46.76   .GPS.            1 u  839 1024  377   37.422    0.189   4.440
    +23.239.24.67    200.98.196.212   2 u  713 1024  377   48.940   -1.173   2.743
    

    At least one of those lines should have an asterisk at the beginning. Give it a go and report back.


Log in to reply
 

Looks like your connection to MagicMirror Forum was lost, please wait while we try to reconnect.