Thank you, this is the easiest and most directly applicable method for
my purposes.
All I need to do is answer the question: "Is MM/DD/YYYY hh:mm:ss more
than 10 days ago? 10 minutes?" and this makes it very easy!
Thanks again!
On 02/12, Briac Pilpr? said something like:
> On Tue, 12 Feb 2002 17:03:00 -0600, Shawn <[EMAIL PROTECTED]> wrote:
> > How might I convert a date/time string to epoch seconds?
> >
> > For example, taking "02/05/2002 02:31:14" and convert to epoch seconds.
>
> One easy way to do it is to use the standard Time::Local module:
>
> #!/usr/bin/perl -w
> use strict;
> use Time::Local;
>
> my $time_string = "02/05/2002 02:31:14";
>
> my ($mday,$mon,$year,$hours,$min,$sec) = split(m![/ :]!, $time_string);
> my $time = timelocal($sec,$min,$hours,$mday,--$mon,$year);
>
> print "Epoch: $time\n";
>
> __END__
--
Shawn Leas
[EMAIL PROTECTED]
I got a new shadow. I had to get rid of the other one
-- it wasn't doing
what I was doing.
-- Stephen Wright
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]