Subject: | wrong time values at march, 20th 2013 |
Date: | Sun, 17 Feb 2013 18:14:35 +0100 |
To: | bug-Astro-Sunrise [...] rt.cpan.org |
From: | heinrich dederichs <heinrichdederichs [...] googlemail.com> |
To whom it may concern,
os: ubuntu 12.04, kernel 3.2.0-37-generic-pae
module : Astro-Sunrise-0.91.tar.gz<http://search.cpan.org/CPAN/authors/id/R/RK/RKHILL/Astro-Sunrise-0.91.tar.gz>
error:
calculating the time values for 2013 the following result will be seen:
19.Mar 06:36 18:39 06:30 18:33 06:20 18:23
20.Mar 05:14 20:01 04:54 20:08 03:13 21:29
21.Mar 06:28 18:46 06:22 18:40 06:10 18:31
produced by the following code:
#######################################################
#!/usr/bin/perl -w
#Sonnenauf- und Untergang
use strict;
use Astro::Sunrise;
#Eitorf
my $lat = 50 + 46/60;
my $lon = 7 + 27/60;
#Tübingen
my $lat1 =48 + 31/60;
my $lon1 = 9 + 3/60;
#Hojby
my $lat2 =55 + 54/60;
my $lon2 = 11 + 36/60;
my $month = 1;
my $day = 1;
my @name = qw(Jan Feb Mar Apr Mai Jun Jul Aug Sep Oct Nov Dec);#
Monatsname, für print
my @max = (31,28,31,30,31,30,31,31,30,31,30,31); #Tage im Monat
printf("%6u",1);
print "\t Eitorf \t\t Tübingen \t\t Hojby\n";
foreach $month(1..12){
foreach my $k (1..$max[$month-1]){
($Astro::Sunrise::sunrise, $Astro::Sunrise::sunset) =
sunrise(2013,$month,$k,$lon,$lat,1,0); #Eitorf
printf("%2u", $k);
print "." ,$name[$month-1], "\t",$Astro::Sunrise::sunrise,
"\t",$Astro::Sunrise::sunset,"\t";
($Astro::Sunrise::sunrise, $Astro::Sunrise::sunset) =
sunrise(2013,$month,$k,$lon1,$lat1,1,0);#Tübingen
print "\t",$Astro::Sunrise::sunrise,
"\t",$Astro::Sunrise::sunset,"\t";
($Astro::Sunrise::sunrise, $Astro::Sunrise::sunset) =
sunrise(2013,$month,$k,$lon2,$lat2,1,0);#Hojby
print "\t",$Astro::Sunrise::sunrise,
"\t",$Astro::Sunrise::sunset,"\n";}
}
#######################################################################################
Heinrich Dederichs