LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-16-2012, 06:33 AM   #1
idnotcrae
Member
 
Registered: May 2011
Distribution: Slackware
Posts: 121

Rep: Reputation: 0
i can't change date


Code:
# date
Sun Dec 16 15:02:46 EET 2012
# date -s "14:44"
Sun Dec 16 14:44:00 EET 2012
# date
Sun Dec 16 15:03:22 EET 2012
# ntpdate pool.ntp.org
16 Dec 15:03:39 ntpdate[26337]: step time server 216.235.14.36 offset -1915.869621 sec
# hwclock
Cannot access the Hardware Clock via any known method.
Use the --debug option to see the details of our search for an access method.
# hwclock --debug
hwclock from util-linux-2.13-pre7
hwclock: Open of /dev/rtc failed, errno=19: No such device.
No usable clock interface found.
Cannot access the Hardware Clock via any known method.
 
Old 12-16-2012, 07:12 AM   #2
rosehosting.com
Member
 
Registered: Jun 2012
Location: Missouri, USA
Posts: 236

Rep: Reputation: 64
Check if you have necessary devices or make them:

cd /dev/ && mknod rtc0 c 254 0 && ln -s /dev/rtc0 /dev/rtc

then execute the following commands:

hwclock -r

(set the Hardware Clock to a specified time):

hwclock --set --date "2012-12-16 07:20"
 
Old 12-16-2012, 07:30 AM   #3
idnotcrae
Member
 
Registered: May 2011
Distribution: Slackware
Posts: 121

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by rosehosting.com View Post
Check if you have necessary devices or make them:

cd /dev/ && mknod rtc0 c 254 0 && ln -s /dev/rtc0 /dev/rtc

then execute the following commands:

hwclock -r

(set the Hardware Clock to a specified time):

# hwclock --set --date "2012-12-16 07:20"
thank you for ur help, i ran the commands and here is the output
Code:
cd /dev/ && mknod rtc0 c 254 0 && ln -s /dev/rtc0 /dev/rtc
ln: creating symbolic link `/dev/rtc' to `/dev/rtc0': File exists
# hwclock -r
Cannot access the Hardware Clock via any known method.
Use the --debug option to see the details of our search for an access method.
 
Old 12-17-2012, 04:00 AM   #4
flukeyLinux
Member
 
Registered: Sep 2012
Location: Ireland
Distribution: Ubuntu redhat, wsl
Posts: 48

Rep: Reputation: Disabled
Try add "server pool.ntp.org" to /etc/ntp.conf then restart ntp - service ntp(d) restart.

ntpq -p should show the ntp server you want the server to point to (pool.ntp.org).
 
Old 12-17-2012, 06:43 AM   #5
alieblice
Member
 
Registered: Jul 2011
Posts: 80

Rep: Reputation: Disabled
try using it in this way :
Code:
date +%T -s "18:00:00"
time will be set to 18:00:00 PM
 
  


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
LXer: How to change Thunderbird's date format in Date column LXer Syndicated Linux News 0 07-18-2012 02:11 AM
Change Date hansi umayangan Linux - General 2 03-01-2005 12:17 AM
Change Date hansi umayangan General 1 02-28-2005 12:02 AM
Change date mbayeb Linux - General 2 01-31-2003 08:57 AM
Change Date ?? joetec Linux - General 1 01-08-2003 07:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:18 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