Hi Flavio,
>
> Dave Rolsky wrote:
> >
> > On Thu, 29 May 2003, Ben Bennett wrote:
[snipped]
>
> Thanks, Ben and Dave.
> I fixed a similar error some time ago, I thought all calls to
> new() were already gone by now.
>
> - Flavio S. Glock
This also has effected the Event-Sunrise module (I believe)
I have just completed a bug file for the module however, I am
unable to test this due to the fact that I am on W2K :(
and unable to upgrade to the new DateTime module (0.12)
and the like.
Under some circumstances ( see script below) a script
that is using the Event-Sunrise module will hang.
This will happen at the $sunrise->current($dt) line.
I have completed the bug fix for the sunrise module and
updated the CVS system. I am now setting the hour/min
as a duration (+ or -) and then adding that to a UTC dateTime
object. This way, the conversion to the local time zone should
work correctly. However, I am unable to test this because I
can't update to the latest DateTime modules :(
Can someone test this script below using the sunrise module
that is located in CVS?
Please advise!
Ron Hill
use strict;
use warnings;
use DateTime;
use Datetime::Event::Sunrise;
my $dt = DateTime->new(year => 2003,
month =>05,
day =>10,
);
my $sunrise = DateTime::Event::Sunrise ->sunrise(
longitude => 114.18,
latitude => 22.33,
);
my $rise= $sunrise->current($dt);
$rise->set_time_zone('Asia/Hong_Kong');
print $rise->datetime;