Operating System - HP-UX
1834806 Members
2468 Online
110070 Solutions
New Discussion

Re: Change the System Date and Time in 11.31

 
UVA
Regular Advisor

Change the System Date and Time in 11.31

Hi,

when i change the system date and time by using the command set_parms date_time

it takes values for the year, month but does't takes the value for the date of the month.

i ma giving the value 26 for the date .

I dont find any option in SMH to set the same.

Is any alternate method is there...


pls help me...
7 REPLIES 7
Torsten.
Acclaimed Contributor

Re: Change the System Date and Time in 11.31

If I run the commend on my system (11.11) it looks like this:

Please enter the last two digits of the year (00-99), then press [Enter] 08

Please enter the month (1-12), then press [Enter] 02

Please enter the date of the month (1-31), then press [Enter] 26

Please enter the hour (using 24 hour time) (0-23)
For example: For 10 in the morning enter 10, for 3 in the afternoon enter 15.
Then press [Enter] 8

Please enter the minute (0-59), then press [Enter] 04

You have entered: Feb 26 08:04:00 MEZ-1MESZ 2008.
This time will be used to reset the system clock.

Is this value correct?

Press [y] for yes or [n] for no, then press [Enter]


Any difference to your system?

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Dennis Handly
Acclaimed Contributor

Re: Change the System Date and Time in 11.31

>Is any alternate method is there...

Use the date(1) command instead.
# date [mmddhhmm[[cc]yy]]
Torsten.
Acclaimed Contributor

Re: Change the System Date and Time in 11.31

Now I'm on a 11.31 system:

Please enter the last two digits of the year (00-99), then press [Enter] 08

Please enter the month (1-12), then press [Enter] 02

Please enter the date of the month (1-31), then press [Enter] 26
/sbin/set_parms.d/12_date_time[6]: 08: The specified number is not valid for this command.

Day number out of range for the month.

Press [Enter] to try again...


Looks like a bug?

But this works:

# date -u 022608152008

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Dennis Handly
Acclaimed Contributor

Re: Change the System Date and Time in 11.31

Hmm, when I do it, I get these bogus errors:
Please enter the month (1-12), then press [Enter] 2

Please enter the date of the month (1-31), then press [Enter] 25
/sbin/set_parms.d/12_date_time[6]: 08: The specified number is not valid for this command.

Day number out of range for the month.

Hee, hee, this fails in 2008 and 2009 in Feb because 08 is octal and that isn't a valid octal number! (It's similar to a Y2K problem.)

This is an existing problem and for 11.23 the bug number is: QXCR1000772654
Ramesh S
Esteemed Contributor

Re: Change the System Date and Time in 11.31

Hi

This is the documentation found for 11.11

This is a known issue in the program /sbin/set_parms.d/12_date_time.This problem is fixed by installing the following patch:
PHCO_28832 cumulative sh-posix(1) patch


So, i would suggest you to install the latest & greatest cumulative sh-posix(1) patch for 11.31

PHCO_37177 -- 11.31 sh-posix(1) cumulative patch

Thanks & Regards

Ramesh


Dennis Handly
Acclaimed Contributor

Re: Change the System Date and Time in 11.31

>Ramesh: i would suggest you to install the latest & greatest cumulative sh-posix(1) patch for 11.31

Are you sure? I thought it was Posix that forced the treatment of leading "0" as octal?

And using that patch didn't help.
UVA
Regular Advisor

Re: Change the System Date and Time in 11.31

Hi,

Anyway guys i did the same by using
this command date 02261130

thanks lot