Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am in process of updating the Solaris Machine's System Date and Time.... I am using the following command.... Loginned as root........

# date -u 062800002010
Mon Jun 28 00:00:00 GMT 2010
# date
Sun Feb 28 05:30:02 IST 2010

As seen above,, when i fire the "date" command again.... the new updated date doesn't get reflected......... Please let me know on what could be the issue.......

Thanks....

share|improve this question
    
What says "zdump -v IST" ? –  jlliagre Jun 30 '10 at 0:02
    
Why aren't you using NTP? If not the NTP daemon, you can set it once using ntpdate. I've not had good luck with the date command either... –  Brian Knoblauch Mar 17 '11 at 12:07
    
Are you in the global zone or another zone? Only the global zone should be able to set the system clock since it's shared by all zones. –  alanc Mar 18 '11 at 2:04
add comment

3 Answers 3

The hardware clock seems to be broken or not responding to updates. This could be an OS bug or hardware failure.

Add the following lines in /etc/system:

set tod_broken=1
set dosynctodr=0

The *tod_broken* parameter will prevent the operating system from attempting to update the hardware clock. The dosynctodr parameter, when set to 0 will stop the operating system from syncing its time from the hardware clock.

These can also be set without rebooting using the following commands:

# echo 'tod_broken/W 1' | mdb -kw
# echo 'dosynctodr/W 0' | mdb -kw

I'd also recommend configuring ntpd to keep your time in sync.

share|improve this answer
add comment

There is no issue. You are setting UTC date (aka GMT) but are displaying it using a specific timezone that has a 5:30 offset. Where are you located (geographically) ?

share|improve this answer
1  
I don't think the timezone can account for a 4 month difference. –  pra Jun 29 '10 at 18:52
    
I overlook that detail, probably because the hours are emphasized but not the date. Anyway, nothing forbids to create a bogus timezone which is ~4 month off. Just set its time offset to around -2880 hours and you are set. –  jlliagre Jun 29 '10 at 23:57
    
I wouldn't say a bogus timezone is a very good solution. It's a cheap hack and it may work for a while but you're gonna run into problems somewhere else. –  Shaun Dewberry Mar 17 '11 at 11:32
    
I'm not talking about a solution, just about a possible root cause of the issue. –  jlliagre Mar 17 '11 at 14:04
add comment

Look again - he is five months off.

Did you su to root, set the time, then exit back to your original process? I do not understand how you got the displays you show. You are connected to the same machine in both of your examples, correct?

share|improve this answer
    
And I'm six month off to comment your reply ;-) It is easy to reproduce the issue by creating a fake timezone with a -2880 hours offset from GMT. –  jlliagre Dec 30 '10 at 3:56
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.