brianjester
Posts: 6
Joined: Wed Jan 09, 2013 5:51 pm
Location: Alaska
Contact: Website

How to set time and date

Thu Jan 10, 2013 7:42 am

I didn't see an option to set the time and date on the raspi-config menu, only locale and timezone. Is there (a non command line way) to set time with the Wheezy distros from the GUI?

My workaround was to set time/date with: "sudo date -u MMDDhhmmCCYY"

Brian Jester
Brian Jester

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: How to set time and date

Thu Jan 10, 2013 7:59 am

brianjester wrote:I didn't see an option to set the time and date on the raspi-config menu, only locale and timezone. Is there (a non command line way) to set time with the Wheezy distros from the GUI?

My workaround was to set time/date with: "sudo date -u MMDDhhmmCCYY"

Brian Jester
Since the Pi has no RTC, setting the time is a per-boot activity, not a config activity. So, one way or another, you will have to execute a command line to set it, on each boot.

"normally", this is done by the boot scripts, once a network connection has been made. But this doesn't work ("normally") if your boot-up sequence doesn't get you a network connection (as is the case for me). So, I have to use the "rdate" command after having made the network connection.
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

User avatar
jheaton5
Posts: 23
Joined: Mon Dec 24, 2012 3:33 pm

Re: How to set time and date

Thu Jan 10, 2013 9:09 am

the debian package ntpdate is a deamon that automatically sets the clock from an NTP server. It will keep you pi's clock up to date and automatically sets the clock on each reboot or cold start.

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: How to set time and date

Thu Jan 10, 2013 10:09 am

jheaton5 wrote:the debian package ntpdate is a deamon that automatically sets the clock from an NTP server. It will keep you pi's clock up to date and automatically sets the clock on each reboot or cold start.
Yes - but only if you have a network connection (at the time of boot!)

That's the whole point.
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

PhillyNJ
Posts: 112
Joined: Sat Dec 29, 2012 4:07 am

Re: How to set time and date

Thu Jan 10, 2013 11:17 am

FWIW - in the US the time zone needs to be set:

Code: Select all

sudo dpkg-reconfigure tzdata
This will give you a GUI to set the time zone.

SirLagz
Posts: 1705
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
Contact: Website

Re: How to set time and date

Thu Jan 10, 2013 1:59 pm

fake-hwclock will at least give you an approx time as long as there's not too much downtime between boots without network connectivity....
Combine that with ntp and you should be right !
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044

Return to “Beginners”

Who is online

Users browsing this forum: No registered users and 16 guests