Visit Jeremy's Blog.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 05-09-2007, 05:27 AM   #1
Josephus Ross
LQ Newbie
Registered: Mar 2007
Posts: 22

Rep: Reputation: 15
date resets when power is cut

Hi there,

I am running Voyage 0.3 debian on a system that is powered over ethernet and am having trouble storing the date permanantly. at the moment I am using the code

date -s 05/09/2007
date -s 10:06:06

if I then 'reboot' the system with or without an internet connection its fine but if I cut power to the unit and then start the box up without an internet connection it loses the date and resets back to 00:00:00 01/01/2000.

I need the unit to remember the time whether the power is cut or whether there is an internet connection or not. How can I go about doiung this?

All help is much appreciated, Thank in advance.

Old 05-09-2007, 05:42 AM   #2
Senior Member
Registered: Dec 2003
Location: Trondheim, Norway
Distribution: Debian and Ubuntu
Posts: 1,335

Rep: Reputation: 362Reputation: 362Reputation: 362Reputation: 362

Checkout "hwclock"

man hwclock explains it.
Old 05-09-2007, 06:55 AM   #3
Senior Member
Registered: Mar 2004
Location: england
Distribution: Slack, Debian, Mint, Puppy, Raspbian
Posts: 3,467

Rep: Reputation: 221Reputation: 221Reputation: 221
is the clock battery OK?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
KDE Setting LOST on power cut, help :D duryodhan Slackware 3 01-17-2007 11:27 PM
Power cut and internet robingazi Debian 2 08-25-2006 10:54 AM
USB Flash Drive - can't cut power malone1234 Linux - Hardware 4 08-19-2005 07:32 AM
effect of power cut on hard disk and motherboard kushalshah Linux - Hardware 6 06-30-2004 04:50 PM
USB ports missing after power cut? slack---line Slackware 2 06-16-2004 06:22 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:45 AM.

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