Re: Rounding Date/Time

2011-05-03 Thread Rob Dixon
On 03/05/2011 19:49, C.DeRykus wrote: On May 2, 9:46 am, lm7...@gmail.com (Matt) wrote: Have a date: 2011-05-02-16:40:51 Using this to get it: $tm = gmtime; $time_stamp = sprintf "%04d-%02d-%02d-%02d:%02d:%02d", $tm->year + 1900, $tm->mon + 1, $tm->mday, $tm->hour, $tm->min, $tm->sec; print

Re: Rounding Date/Time

2011-05-03 Thread C.DeRykus
On May 3, 11:54 am, shawnhco...@ncf.ca (Shawn H Corey) wrote: > On 11-05-03 02:49 PM, C.DeRykus wrote: > > > my @rounded_5mins = grep { not $_ % 5 } 0..60; > > my @rounded_5mins = map { $_ * 5 } 0..12; > > # TIMTOWTDI > Make that: TIMTOWTDI++ # a much better way to do it -- Charles DeRykus -

Re: Rounding Date/Time

2011-05-03 Thread Shawn H Corey
On 11-05-03 02:49 PM, C.DeRykus wrote: my @rounded_5mins = grep { not $_ % 5 } 0..60; my @rounded_5mins = map { $_ * 5 } 0..12; # TIMTOWTDI -- Just my 0.0002 million dollars worth, Shawn Confusion is the first step of understanding. Programming is as much about organization and commu

Re: Rounding Date/Time

2011-05-03 Thread C.DeRykus
On May 2, 9:46 am, lm7...@gmail.com (Matt) wrote: > Have a date: > > 2011-05-02-16:40:51 > > Using this to get it: > > $tm = gmtime; > $time_stamp = sprintf "%04d-%02d-%02d-%02d:%02d:%02d", >  $tm->year + 1900, $tm->mon + 1, $tm->mday, $tm->hour, $tm->min, $tm->sec; > print "$time_stamp\n"; > > I n

Re: Rounding Date/Time

2011-05-03 Thread Rob Dixon
On 02/05/2011 17:46, Matt wrote: Have a date: 2011-05-02-16:40:51 Using this to get it: $tm = gmtime; $time_stamp = sprintf "%04d-%02d-%02d-%02d:%02d:%02d", $tm->year + 1900, $tm->mon + 1, $tm->mday, $tm->hour, $tm->min, $tm->sec; print "$time_stamp\n"; I need to round it to nearest 5 minut

Re: Password reset for unix

2011-05-03 Thread krish
On May 2, 11:51 pm, ag4ve...@gmail.com (shawn wilson) wrote: > On May 2, 2011 2:14 PM, "Kenneth Wolcott" wrote: > > > > >   It looks like you have a great working system for annually forcing > > the change of UNIX passwords in a systematic manner, but it would > > definitely not be good to emulate