On Wed, 24 Sep 2003, Flavio S. Glock wrote:

> This is what it looks like (tested!):
>
> ---
> #!/usr/local/bin/perl
> use DateTime;
> use DateTime::Set 0.1202;
> use DateTime::Event::Sunrise;
>
> my $dt = DateTime->new(
>      year   => 2003,
>      month  => 9,
>      day    => 24,
>      time_zone => 'America/New_York',
> );
>
> my $sunrise = DateTime::Event::Sunrise->sunrise (
>      longitude =>'-73.59',
>      latitude =>'40.38',
>      altitude => '-0.833',
>      iteration => '1'
> )->set_time_zone( 'America/New_York' );

I really don't think we should make users do this if we can avoid.

> my $rise = $sunrise->next($dt);
> print $rise->datetime, " ", $rise->time_zone_long_name, "\n";

This should probably set the returned datetime to the same timezone as the
given datetime.


-dave

/*=======================
House Absolute Consulting
www.houseabsolute.com
=======================*/

Reply via email to