Re: Time conversion question

2002-02-12 Thread Shawn
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/ 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 1

Re: Time conversion question

2002-02-12 Thread Briac Pilpré
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 str

RE: Time conversion question

2002-02-12 Thread Hanson, Robert
My favorite way is to use Date::Parse (http://search.cpan.org/doc/GBARR/TimeDate-1.10/lib/Date/Parse.pm) use Date::Parse; my $epoch = str2time("02/05/2002 02:31:14"); It comes with the Time-Date bundle (http://search.cpan.org/search?dist=TimeDate) which also includes the method time2str() for