LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-14-2015, 07:06 AM   #1
iFunction
Member
 
Registered: Nov 2015
Posts: 248

Rep: Reputation: Disabled
Raspberry pi won't update time


Hi there,

This is really annoying, there is a lot about this issue, but all refer to editing "rc.conf" which Raspbian Jessie (December 2015) does not seem to have.

Can anyone explain how I can get it to update the time from an NTP server please. I have also tried using:
Code:
sudo ntpd -gq
Which does absolutely nothing at all.

Please help this is quite frustrating and is the only task that is essential in this particular build.

Kind regards
iFunc
 
Old 12-14-2015, 07:25 AM   #2
Soadyheid
Senior Member
 
Registered: Aug 2010
Location: Near Edinburgh, Scotland
Distribution: Cinnamon Mint 20.1 (Laptop) and 20.2 (Desktop)
Posts: 1,672

Rep: Reputation: 486Reputation: 486Reputation: 486Reputation: 486Reputation: 486
I may have the wrong end of the stick but I don't believe the Raspberry Pi has a RTC to update.

Play Bonny!

 
Old 12-14-2015, 07:50 AM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,680

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
That does not mean you can not run ntp to set the system clock.

How is your network currently configured? Is this a master or slave?
Does the Pi acquire an IP address?
Can it ping the internet i.e ping 8.8.8.8? (google)
 
1 members found this post helpful.
Old 12-14-2015, 08:05 AM   #4
Soadyheid
Senior Member
 
Registered: Aug 2010
Location: Near Edinburgh, Scotland
Distribution: Cinnamon Mint 20.1 (Laptop) and 20.2 (Desktop)
Posts: 1,672

Rep: Reputation: 486Reputation: 486Reputation: 486Reputation: 486Reputation: 486
Quote:
That does not mean you can not run ntp to set the system clock.
Thanks for the clarification michael I wasn't sure.

Play Bonny!

 
Old 12-14-2015, 08:24 AM   #5
iFunction
Member
 
Registered: Nov 2015
Posts: 248

Original Poster
Rep: Reputation: Disabled
Hi there,

Currently, the pi I am playing with is stand alone until I can fix this issue. So:
The pi is currently connected to the internet at work (Though to be fair it was updating on my home network...?)

Ah... does the time update through a different port than the internet. Yes it does, it uses port 123 which i won't be allowed to access.

Ok change of question then, how can I get the time to update through port 80 in the event that port 123 is blocked?

Kind regards
iFunc
 
Old 12-14-2015, 09:21 AM   #6
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,923
Blog Entries: 44

Rep: Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158Reputation: 3158
Member response

Hi,

From https://www.raspberrypi.org/forums/v...it=RTC#p861950
Quote:
How much is your Pi off? Minutes, hours, days?

If you have a permanent internet connection you don't need an RTC, NTP will synchronize the time with the internet. Raspbian has NTP installed by default, but if you don't have it, it is easy to install.

EDIT
: I use a cron.hourly script called time;
Code:
#!/bin/sh
#11-06-06 gws use ntp
 /usr/sbin/ntpdate -v north-america.pool.ntp.org 1.north-america.pool.ntp.org 2.north-america.pool.ntp.org 3.north-america.pool.ntp.org &&hwclock --systohc
You can use a RTC shield or just change the script to set the time & date

Hope this helps.
Have fun & enjoy!

Last edited by onebuck; 12-14-2015 at 09:26 AM. Reason: add a comment
 
Old 12-14-2015, 09:22 AM   #7
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,680

Rep: Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894Reputation: 5894
Are the Pis always going to be setup at your place of work?

I've seen some posts on running ntp via a VPN but that might not be practical in your case.
 
Old 12-14-2015, 10:35 AM   #8
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Quote:
Originally Posted by iFunction View Post
Ok change of question then, how can I get the time to update through port 80 in the event that port 123 is blocked?
ntp uses port 123, port 80 is http. In order to use ntp over port 80, you'd need to be connecting to a server that runs an ntp server that listens on port 80, which is HIGHLY unlikely.

You could use an ssh tunnel to route your ntp requests outside of your network, but the real question is why on earth your work blocks OUTGOING connections on 123? Is it because they run their own local NTP server they want everyone to use? How is NTP configured on your desktops/workstations?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Followed instructions exactly but Raspberry Pi B+ won't boot Altiris Slackware - ARM 3 06-13-2015 05:11 PM
Raspberry Pi time keeping kzo81 Linux - Embedded & Single-board computer 4 11-06-2014 07:05 AM
real time clock on Raspberry Pi B+ mjosh Slackware 5 10-21-2014 06:44 AM
LXer: How to configure Raspberry Pi for the first time LXer Syndicated Linux News 0 11-20-2013 08:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration