[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] timelocal question



I want to find the elapsed time between two dates. The "timelocal"
function seems ideal for this purpose, since it converts time and
date into an integer.  However, I can't get it to return anything
except -1.

Others have posted to this list in the past about problems with
time integers; they have indicated that this is a problem in Perl 5.002 
(I'm running MacPerl 5.002_01).

Is my problem another manifestation of this?  Does anyone know of
a workaround or a technique that works?

This script demonstrates the problem:

  require "timelocal.pl";
  @now = localtime;
  $x = timelocal( @now );
  print join( ":", @now), "\nTimelocal returned: $x\n";

Thanks for your help,

    -Paul-      paul.b.patton@hbc.honeywell.com

***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch