[Buffalo-pm] Getting Date/Time 1 Minute Ago...

joshj at linuxmail.org joshj at linuxmail.org
Tue Sep 25 13:33:46 PDT 2007


In Perl:

 	print localtime(time - 60);


There's probably an easy way to do it in Linux, too. But it doesn't get
much easier than that.

-Josh J

Thus spake Dan Magnuszewski:

> 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 from
> minute) but it can get messy  at midnight on the first of the month, or the
> first day of the year, etc. It's not hard, just a pain to code that up, and
> it'd be nice if there was already something that could do the work for me
> :-)
>
> Does anyone know of anything that will do this?
>
> -Dan
>


More information about the Buffalo-pm mailing list