(CC:ed ph-perl)

On Mon, Dec 16, 2002 at 01:16:10AM -0500, Gerald Timothy Quimpo wrote:
> On Sunday 15 December 2002 11:45 pm, Ina Patricia Lopez wrote:
> >  what command i can use to convert the last change field (/etc/shadow)
> > to date format?
> 
> man shadow (on mandrake, not sure if you have that on your installation)
> says that the last password change field is the number of days since
> 1Jan1970 since the password was changed.  so if it is "1", then
> the password was last changed on 2 Jan 1970.

it's called epoch seconds.

> 
> i don't know what the quick solution would be offhand. 

another solution (besides the one you posted earlier) is to use perl's
locatime function.
ex.

$ perl -le 'print scalar localtime 1073867006'

this will print

Mon Dec 16 14:40:22 2002

HTH
-- 
$_=q:; # SHERWIN #
70;72;69;6e;74;20;
27;4a;75;73;74;20;
61;6e;6f;74;68;65;
72;20;50;65;72;6c;
20;6e;6f;76;69;63;
65;27;:;;s=~?(..);
?=pack q$C$,hex$1;
;;;=egg;;;;eval;;;
_
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]

Fully Searchable Archives With Friendly Web Interface at http://marc.free.net.ph

To subscribe to the Linux Newbies' List: send "subscribe" in the body to 
[EMAIL PROTECTED]

Reply via email to