Skip Menu |

This queue is for tickets about the Time-Format CPAN distribution.

Report information
The Basics
Id: 44167
Status: resolved
Worked: 15 min
Priority: 0/
Queue: Time-Format

People
Owner: eric.roode.cpan [...] gmail.com
Requestors: karl.moens [...] telenet.be
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Negative microseconds and milliseconds
Date: Sat, 14 Mar 2009 22:17:08 +0100
To: bug-Time-Format [...] rt.cpan.org
From: Karl Moens <karl.moens [...] telenet.be>
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 When using Time::Format, print $time{'hh:mm:ss.uuuuuu'} prints "22:14:57.-498630", i.e. negative microseconds. As similar thing happens with the milliseconds. This happens on Windows XP Professional. My Perl: This is perl, v5.8.8 built for MSWin32-x86-multi-thread (with 18 registered patches, see perl -V for more detail) Copyright 1987-2007, Larry Wall Binary build 822 [280952] provided by ActiveState http://www.ActiveState.com Built Jul 31 2007 19:34:48 Karl Moens (CountZero) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkm8HtMACgkQJeU7XmmCbf/qnQCeN0X1ieMJtO7FAbUzm5SansYU OQQAoJiwd067bbcxm0aiCCiWTTcES14z =ZO8U -----END PGP SIGNATURE-----
This is a patch for the bug. Regards, Joerg On Sa. 14. Mär. 2009, 17:17:29, karl.moens@telenet.be wrote: Show quoted text
> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > When using Time::Format, > > print $time{'hh:mm:ss.uuuuuu'} > > > prints "22:14:57.-498630", i.e. negative microseconds. > > As similar thing happens with the milliseconds. > > This happens on Windows XP Professional. > > My Perl: > > This is perl, v5.8.8 built for MSWin32-x86-multi-thread > (with 18 registered patches, see perl -V for more detail) > > Copyright 1987-2007, Larry Wall > > Binary build 822 [280952] provided by ActiveState > http://www.ActiveState.com > Built Jul 31 2007 19:34:48 > > Karl Moens (CountZero) > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.9 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iEYEARECAAYFAkm8HtMACgkQJeU7XmmCbf/qnQCeN0X1ieMJtO7FAbUzm5SansYU > OQQAoJiwd067bbcxm0aiCCiWTTcES14z > =ZO8U > -----END PGP SIGNATURE----- >
--- lib/Time/Format.pm 2008-05-28 02:35:44.000000000 +0200 +++ /tmp/Time/Format.pm 2009-03-14 22:33:51.400700000 +0100 @@ -369,7 +369,7 @@ # Get numeric time $timeval = _have('Time::HiRes')? Time::HiRes::time() : time; $cache_value = int $timeval; - $frac = $cache_value - $timeval; + $frac = $timeval - $cache_value; $time_type = $NUMERIC_TIME; } else
Fixed in v1.12. Thank you, Karl.