[Buffalo-pm] Getting Date/Time 1 Minute Ago...
magnachef at gmail.com
Tue Sep 25 13:42:11 PDT 2007
Yeah, that's what I was looking for!
On 9/25/07, Ben. B. <bennymack at gmail.com> wrote:
> If you deal with a Unix time_t to start with, it really should be as
> simple as subtracting 60 seconds from it. Then use POSIX::strftime to
> format it however you like.
> perl -Mstrict -Mwarnings -MPOSIX -e 'my $time = time; printf( "NOW:
> %s, ONE MINUTE AGO: %s\n", scalar localtime $time, scalar localtime
> $time - 60 );'
> I can't think of any situations where that wouldn't work, but I'm often
> On 9/25/07, Dan Magnuszewski <magnachef at gmail.com> wrote:
> > All,
> > I'm looking for a module or Linux command that will allow me to get the
> > date/time one minute ago. I know this sounds trivial (just subtract 1
> > minute) but it can get messy at midnight on the first of the month, or
> > first day of the year, etc. It's not hard, just a pain to code that up,
> > it'd be nice if there was already something that could do the work for
> > :-)
> > Does anyone know of anything that will do this?
> > -Dan
> > _______________________________________________
> > Buffalo Perl Mongers Homepage
> > http://buffalo.pm.org
> > Buffalo-pm mailing list
> > Buffalo-pm at pm.org
> > http://mail.pm.org/mailman/listinfo/buffalo-pm
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Buffalo-pm