Re: JD problem
Jason Thaxter schreef: > Curiosity got the better of me. The fix works and is demonstrated below. Thank you! I have just uploaded version 0.10 of the package to CPAN. Eugene van der Pijll
Re: JD problem
Curiosity got the better of me. The fix works and is demonstrated below. Now it really *is* past my bedtime or I'd write a test... ;-) On Monday 22 May 2006 01:06, Jason Thaxter wrote: > 167c167 > < if ($rd_secs >= 86400) { > --- > > > if ($rd_secs > 86400) { > > Seems obvious enough. But it's past my bedtime and I've got no time for > testing this at the moment. If someone who knows the internals better than > i could confirm this fix, I'd be grateful. Else, I'll try to produce a test > case and confirm myself in about 24 hours. ~) perl -MDateTime::Format::Epoch::JD $time = 2453877.5; $dt = DateTime::Format::Epoch::JD->parse_datetime($time); print "JD=$dt\n"; ^D The 'hour' parameter ("24") to DateTime::new did not pass the 'is between 0 and 23' callback at /usr/local/lib/perl5/site_perl/5.8.8/DateTime/Format/Epoch.pm line 179 # su'd, made edit... ~) perl -MDateTime::Format::Epoch::JD $time = 2453877.5; $dt = DateTime::Format::Epoch::JD->parse_datetime($time); print "JD=$dt\n"; ^D JD=2006-05-22T00:00:00 Cheers, Jason -- -- Jason Thaxter GoMOOS 350 Commercial Street, Suite 308 Portland, ME 0410 Office: 207.773.0423 Tel: 207.228.1665 Email: [EMAIL PROTECTED] www.gomoos.org
JD problem
I have a bug using DateTime::Format::Epoch::JD: The 'hour' parameter ("24") to DateTime::new did not pass the 'is between 0 and 23' callback at /usr/local/lib/perl5/site_perl/5.8.8/DateTime/Format/Epoch.pm line 179 I'm pretty sure the problem actually occurs on a time where UTC is midnight. It's worth my while to fix this, so I took a look and I'm trying out this change in the file mentioned above. 167c167 < if ($rd_secs >= 86400) { --- > if ($rd_secs > 86400) { Seems obvious enough. But it's past my bedtime and I've got no time for testing this at the moment. If someone who knows the internals better than i could confirm this fix, I'd be grateful. Else, I'll try to produce a test case and confirm myself in about 24 hours. For reference, I'm using: DateTime::Format::Epoch - version 0.09 DateTime - version 0.30 Thanks, Jason -- -- Jason Thaxter GoMOOS 350 Commercial Street, Suite 308 Portland, ME 0410 Office: 207.773.0423 Tel: 207.228.1665 Email: [EMAIL PROTECTED] www.gomoos.org