use strict; use warnings; use Astro::Coords::Planet; use Astro::Telescope; use DateTime; my %params = ( year => 2022, month => 4, day => 1, hour => 0, minute => 1, second => 0, time_zone => 'Pacific/Auckland', ); my $obsDate = DateTime->new(%params); my $cSun = Astro::Coords->new(planet => 'sun'); $cSun->telescope(Astro::Telescope->new('485')); $cSun->datetime($obsDate); $cSun->datetime()->set_time_zone('Pacific/Auckland'); my $sRise = $cSun->rise_time(); my $sSet = $cSun->set_time(); my $tz = $sRise->time_zone()->name(); print "Rise: $sRise Set: $sSet ($tz)\n"; #### Rise: 2022-04-01T18:34:16 Set: 2022-04-01T06:12:04 (Pacific/Auckland) #### Rise: 2022-04-01T06:12:04 Set: 2022-04-01T18:34:16 (Pacific/Auckland)