Operating System - HP-UX
1753802 Members
7872 Online
108805 Solutions
New Discussion юеВ

Re: Query on date command

 
SOLVED
Go to solution
Md. Minhaz Khan
Super Advisor

Query on date command

Dear Concern
I have given the following commands:

$ date;date -u
Tue Jun 9 15:00:05 bgh 2009--->System Local Time
Tue Jun 9 09:00:05 UTC 2009--->UTC time

Now say if i modify the time using "date" command which is as follows:

#date 060916592009

9th June 16:59:00

then does it change UTC time or Local Time
And after reboot the system the above time that i change using date command will remain unchange??


Thanks
Minhaz
6 REPLIES 6
Suraj K Sankari
Honored Contributor
Solution

Re: Query on date command

Hi,

date command will change you current system's local date & time.
according to your local date & time your UTC time will reflect.

Best option of changing date time is SAM

Suraj
Basheer_2
Trusted Contributor

Re: Query on date command

Minhaz,

try
set_parms date_time
(I think this needs a reboot)

set_parms
(this willl give you all the options)
Md. Minhaz Khan
Super Advisor

Re: Query on date command

Thanks a lot Suraj.

after changing local time by date command if we reboot the system then the time that we change using date command will remain unchanged when the system up??

Thanks
Minhaz
Dennis Handly
Acclaimed Contributor

Re: Query on date command

Do NOT change your system time, your UTC time is fine, it matches your posting time. You just need to set your timezone correctly. What does "echo $TZ" show?
For India it should be "TZ=IST-5:30". But you seem to be further east.

>after changing local time by date command if we reboot the system then the time that we change using date command will remain unchanged when the system up?

Well, N minutes would have gone by. :-)
Md. Minhaz Khan
Super Advisor

Re: Query on date command

Dear Dennis

I do not understood by
>>Well, N minutes would have gone by. :-)

Please can you clear me


Thanks
Minhaz
Dennis Handly
Acclaimed Contributor

Re: Query on date command

>>Well, N minutes would have gone by. :-)

>I do not understood by

If takes N minutes to reboot, then the clock would have advanced by that amount of time.