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
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.
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!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.