Operating System - Linux
1751871 Members
5362 Online
108782 Solutions
New Discussion юеВ

Re: how to set date and time in linux

 
yogesh kumar_2
Frequent Advisor

how to set date and time in linux

hi

How to set date and time in linux.
7 REPLIES 7

Re: how to set date and time in linux

to check the Date
#date
Thu Sep 25 05:41:14 EDT 2008

to change the date
# date -s "Thu Sep 25 05:41:14 EDT 2008"
change the "" fields as per your requirment.

Let me know if it works or the date which you want to be set
Robert-Jan Goossens
Honored Contributor

Re: how to set date and time in linux

yogesh kumar_2
Frequent Advisor

Re: how to set date and time in linux

Thank you sushil
Kapil Jha
Honored Contributor

Re: how to set date and time in linux

Moderator please move this thread to linux.
Anyways you can set timezone correctly aslo as it may cause some time issue.
BR,
kapil+
I am in this small bowl, I wane see the real world......
Suraj K Sankari
Honored Contributor

Re: how to set date and time in linux

Hi,

from command line
to set the date to Sep 25 12:45 AM
#date 0925004508
here
09 is mon
25 is date
00 is hr.
45 in min.
08 is year

Suraj
Steven E. Protter
Exalted Contributor

Re: how to set date and time in linux

Shalom,

date command will do it. See the man page.

Also note that ntp is the way to make sure time and data are consistent through out your network.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Dennis Handly
Acclaimed Contributor

Re: how to set date and time in linux

>kapil: Moderator please move this thread to linux.

Requests to move threads can be made by replying to a monthly thread like:
July-September 2008 Moderator Intervention thread
http://forums.itrc.hp.com/service/forums/questionanswer.do?threadId=1245248