LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 05-09-2007, 04: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.

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

Rep: Reputation: 447Reputation: 447Reputation: 447Reputation: 447Reputation: 447
Hi

Checkout "hwclock"

man hwclock explains it.
 
Old 05-09-2007, 05:55 AM   #3
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Mint, Armbian, NetBSD, Puppy, Raspbian
Posts: 3,515

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


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

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:16 AM.

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