Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

system date and time change?

Status
Not open for further replies.

alphaaa

Technical User
Jan 15, 2002
45
0
0
US
solaris machine date and time has changed somehow, now i need to set its time back to original. Please someone tell me how to set system time. server is back 3 years 38 days and aporximately 8 hours. also, can i do it with out rebooting it?
 
No problem, here's what you need (and no reboot!):

The command that you use to change the date and time of the server is called 'date.' You'll need to be root to do this.

1. su to root

2. type 'date' at the prompt

3. type date mmddHHMM
Example: 'date 03120950' would set's the date to
Tue Mar 12 09:50:00 PST 2002. Remember to use two
digits for each letter even if it's only a 0

4. type 'date' to check the date.

Also, if you're running Solaris 8 (and 7 I think) and you're not behind a firewall, you can use NTP. But that's another post. :) --
robb
 
Thanks Robbla it worked and I set the time back to it's original.
Now i realized what a stupid question was it.
 
There are no stupid questions, ever. This forum is great for people like us; here helping each other.

I was glad to be able to answer it for you!
--
robb
 
Hi all,

I need to change the date format from mm/dd/yy to dd/mm/yy.
I managed to change the date format using date '+DATE: %d/%m/%y'.
But when I reissue the date command, it will be revert back
to mm/dd/yy.
Any idea how I can make this change permantely.
Evertime I logged in , I will like the date format to reflect dd/mm/yy.
I am using bourne shell.

thanks.



 
Not sure if this will help, but can you see what the variable LC_TIME is set to? Type set | pg to produce a list of variables and values. Ours (in the UK) is set to:

LC_TIME=en_GB

As far as I know there's no way of changing the date command to permanently display in the way you require. Others may well know better, of course!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top