libwww-perl-5.64 date test passes with 5.7.2 or earlier, but fails
with bleedperl. Here's a snippet of the code and its output.


  $t = str2time("2000-01-01 00:00:01.234");
  print "FRAC $t = ", time2iso($t), "\n";
  ok(abs(($t - int($t)) - 0.234) > 0.000001); # ok() accepts false and says ok

  FRAC 946652401 = 2000-01-01 00:00:01
  not ok 51

This is due to that Time::Local::localtime() uses 'integer' in the
calculation, thus breaks floating point seconds into
integer. Simplified test script as follows:

  use Time::Local;
  use Test::More 'no_plan';
  
  my $t = timelocal('01.234', 0, 0, 1, 1, 99);
  is $t, 917794801.234;

which passes with 5.7.2, but fails with bleedperl.


-- 
Tatsuhiko Miyagawa <[EMAIL PROTECTED]>

Reply via email to