MagicMirror² v2.13.0 is available! For more information about this release, check out this topic.

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.


  • Does anyone have any advice?

  • Project Sponsor 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

  • Project Sponsor

    @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/ -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 iburst
    server iburst
    server iburst
    server 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
    +   .PPS.            1 u  856 1024  377   18.624   -1.660   5.766
    +     2 u  468 1024  377   27.636    0.276   6.356
    *   .GPS.            1 u  839 1024  377   37.422    0.189   4.440
    +   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