Operating System - HP-UX
1831555 Members
3777 Online
110025 Solutions
New Discussion

Re: adb datestamp conversion under 11.23

 
SOLVED
Go to solution
Scott Lindstrom_2
Regular Advisor

adb datestamp conversion under 11.23

I have not been able to make heads or tails of the man page for adb, so I need to go ahead and ask here:

I have found code here in the forums to determine the last (or next) password change date. For example, under 11.11:

echo 0d1130437460=Y | adb

returns:
2005 Oct 27 13:24:20

Under 11.23 the code fails with the message:

adb: warning: Unrecognized format character - 'Y'.

Does anyone know the 'new' format to make this work under 11.23?

Scott
3 REPLIES 3
James R. Ferguson
Acclaimed Contributor
Solution

Re: adb datestamp conversion under 11.23

Hi Scott:

I don't have 11.23 to offer a reason, but you can easily use perl:

# perl -le 'print scalar localtime(1130437460)'

Regards!

...JRF...
Scott Lindstrom_2
Regular Advisor

Re: adb datestamp conversion under 11.23

James -

It looks like that works great on both 11.11 and 11.23.

Out of curiosity I'd like to see if anyone has the 'adb' answer.

BTW, this is the 3rd or 4th time I've needed to modify scripts using adb as we implement 11.23.

Scott
James R. Ferguson
Acclaimed Contributor

Re: adb datestamp conversion under 11.23

Hi (again) Scott:

It appears that with 11.23 'adb' has undergone some extensive work. There is now a "normal" ('-n') mode for Itanium systems and an "old" ('-o') mode for backward compatability with PA-RISC.

Apparently you can use the '-o' (old) mode on Itanium systems to obtain the "old" behavior.

Too, if I read the manpages correctly, you should be able to use a lowercase "y" in lieu of an uppercase "Y" to obtain the date conversion.

Have a look here:

http://www.docs.hp.com/en/B2355-60105/adb.1.html

BTW, I *still* prefer perl! :-))

Regards!

...JRF...