change system date in solaris


 
Thread Tools Search this Thread
Operating Systems Solaris change system date in solaris
# 1  
Old 06-18-2007
change system date in solaris

dears

any one know how to change system date in solaris
# 2  
Old 06-18-2007
As root:

#date <date_you_want_to_change_to>
# 3  
Old 06-18-2007
or use ntp
# 4  
Old 06-18-2007
Quote:
Originally Posted by porter
or use ntp
you use ntp to change the system date? or you use it to synchronize the time with an ntp server?
# 5  
Old 06-18-2007
Quote:
Originally Posted by ghostdog74
you use ntp to change the system date? or you use it to synchronize the time with an ntp server?
Sure, using NTP changes the system date, so porter is technically corrrect.
# 6  
Old 06-18-2007
Date on Solaris Machine

I think that you can use the command
date -u command or date -s command with the arguments.
Former takes the argumemt in format ddmmyyyyhhmm and latter a string that you get when you give date command on command prompt..this string goes in quotes as argument to date -s
Alternatively you can use ntpdate command to set date or synchronize the date with another machine.
# 7  
Old 06-19-2007
NTP is a good option for time syncronisation.
However, I guess for solaris if your system is way too behind (more than 14 mins I think) NTP will fail.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Answers to Frequently Asked Questions

Compare date in .txt with system date and remove if it's lesser than system date

I m working on shell scripting and I m stuck where in my .txt file there is column as expiry date and I need to compare that date with system date and need to remove all the rows where expiry date is less than system date and create a new .txt with update. (1 Reply)
Discussion started by: Stuti
1 Replies

2. UNIX for Beginners Questions & Answers

Compare date in .txt with system date and remove if it's lesser than system date

Can someone help me with the code wherein there is a file f1.txt with different column and 34 column have expiry date and I need to get that and compare with system date and if expiry date is <system date remove those rows and other rows should be moved to new file f2.txt . I don't want to delete... (2 Replies)
Discussion started by: Stuti
2 Replies

3. UNIX for Dummies Questions & Answers

Change File Creation Date On Solaris

Dear Masters, I am using solaris 10. There is a requirement if a file created on Feb 1 or Feb 2, the creation date will be changed to Jan 31. Is there any command on Solaris to do that? Thanks, Kris (1 Reply)
Discussion started by: kris.adrianto
1 Replies

4. Shell Programming and Scripting

Change the content of files but not change the date

I have 100 files in a directory , all the files have a word "error" and they are created in different date . Now I would like to change the word from "error" to "warning" , and keep the date of the files ( that means do not change the file creation date after change the word ) , can advise what can... (7 Replies)
Discussion started by: ust3
7 Replies

5. Shell Programming and Scripting

Change the content of files but not change the date

I have 100 files in a directory , all the files have a word "error" and they are created in different date . Now I would like to change the word from "error" to "warning" , and keep the date of the files ( that means do not change the file creation date after change the word ) , can advise what can... (0 Replies)
Discussion started by: ust3
0 Replies

6. Solaris

Change date format in solaris 10

Hi We have upgraded our sun machine from solaris 9 to solaris 10. Before upgradation the date command output(Solaris 9) Wed Oct 13 09:45:21 IST 2010 But after upgradation the output for date is as below(solaris 10). Wednesday, October 13, 2010 9:46:14 AM IST Looks like I need to... (1 Reply)
Discussion started by: csreenivas
1 Replies

7. Solaris

System date sudden change

Hi there, We have a Solaris 10 machine which has been up and running for more than 400 days. A strange behaviour happened. The system date defaulted to epoch timestamp. Oracle stopped and application failed causing management to parade. We managed to reset the date. All other servers and... (8 Replies)
Discussion started by: sundar63
8 Replies

8. UNIX for Advanced & Expert Users

Change of System Date format

I have this T5220 server with Solaris 10 installed on to it. Now when I fire the command "date" the o/p I get is as follows : bash-3.00# date Tuesday, February 9, 2010 7:25:24 PM IST whereas I want the date to appear in this format: bash-3.00# date Tue Feb 9 19:26:06 IST 2010 ... (3 Replies)
Discussion started by: ksahay@123
3 Replies

9. UNIX for Dummies Questions & Answers

Move A File With Same Date,don't Change The Desitination Dir Date

Assume, I created one file three years back and I like to move the file to some other directory with the old date (Creation date)? Is it possible? Explain? (1 Reply)
Discussion started by: jee.ku2
1 Replies

10. AIX

Change System Date

Hi, anybody know how to change the system date which the year is greater than 2037? is it posibble been done under aix machine?? thanks :) (1 Reply)
Discussion started by: Ricole
1 Replies
Login or Register to Ask a Question