Operating System - HP-UX
1825759 Members
2223 Online
109687 Solutions
New Discussion

Re: Converting seconds to dates /tcb/files/auth files

 
SOLVED
Go to solution
Chuck Sims
Advisor

Converting seconds to dates /tcb/files/auth files

Aloha,

Does anyone have a good (read easy) way to convert the seconds found in the /tcb/files/auth files to readable dates?

Thanks...
"I feel like I'm diagonally parked in a parallel universe."
4 REPLIES 4
Con O'Kelly
Honored Contributor
Solution

Re: Converting seconds to dates /tcb/files/auth files

Hi Chuck

Not sure if you're aware but the following command does this for you:
# /usr/lbin/getprpw

Apologies if this is not what you're after apologies...

Cheers
Con
Sundar_7
Honored Contributor

Re: Converting seconds to dates /tcb/files/auth files

Hi Chuck,

If you are looking to convert the seconds from Jan 1 1970 to dates then

# echo "0dseconds=Y" | adb

Seconds is from the tcb files.

Thanks,

Sundar.

Learn What to do ,How to do and more importantly When to do ?
Ollie R
Respected Contributor

Re: Converting seconds to dates /tcb/files/auth files

Hi,

If you have perl installed you can run:

perl -e 'print scalar localtime()."\n"'

For example:

$ perl -e 'print scalar localtime (1000000000)."\n"'
Sun Sep 9 03:46:40 2001

Ollie.
To err is human but to not award points is unforgivable
Chuck Sims
Advisor

Re: Converting seconds to dates /tcb/files/auth files

Aloha,

Many thanks to Con, Sundara, and Ollie. Three great answers. All right on the money. Now I've got lots of options.

Chuck
"I feel like I'm diagonally parked in a parallel universe."