Forgive if this is repost, but I never saw that it got posted so I'm
resending....
Many thanks to:
Padraig Houlahan
Kevin Hildebrand
Randy M. Hayman
Ross Alexander
reeves_at_zk3.dec.com
Yaacov Fenster
Don Newcomer
Tim Mooney
Igor Natanzon
Eric B.
My Original question:
>Hi,
>
>I'm running Digital UNIX 3.2C Enhanced Security. Does anyone know of an easy
>way (or have a script) to turn those times in the /tcb/files/auth/[a-z]/* into
a
>valid date and time? An example date is 827953633 which converts to March 27,
>1996 14:07:13 (or at least that's what shows up when I log in).
>
>What I'm looking to do is create a last login report that I can send to group
>leaders. I want to flag accounts that haven't logged in 90 days in this report
>so it's easier to spot inactive accounts.
==============================================================================
As usual this list is great. I got lots of good help. Here's a copy of some C
code from Kevin Hildebrand that does the trick!
---------------------------------------------------------------------------
#include <time.h>
int main (int argc, char **argv)
{
time_t time;
if (argc!=2)
{
printf ("usage: whenis <time>\n");
exit (1);
}
time = atoi (argv[1]);
printf ("%s\n", ctime(&time));
exit (0);
}
---------------------------------------------------------------------------
> cc -o whenis whenis.c
> whenis 827953633
Wed Mar 27 14:07:13 1996
==============================================================================
What I'm using however, is a perl script from Tim Mooney. He asked me not to
post it, however, because he thought it was ugly! I'm also investigating an
accounts package from Randy M. Hayman that looks like it does lots of neat
stuff. The URL for it is:
ftp://raven.alaska.edu/pub/randy/zuausr
Thanks folks! Also thanks for letting me know that the crazy number was the
numer of seconds since Midnight Jan 1, 1970 GMT. It makes things easier to
understand.
Sheila
*******************************************************************************
** Sheila H. Franklin **
** Naval Surface Warfare Center Dahlgren Division **
** 17320 Dahlgren Road **
** Code N861 **
** Dahlgren, VA 22448-5000 **
** Phone: (540) 653-8705 **
** Internet: sfrankl_at_.nswc.navy.mil **
*******************************************************************************
Received on Mon Apr 01 1996 - 19:34:35 NZST