<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">diff --git a/Sunrise.pm b/Sunrise.pm
index 79973b6..0bae9e2 100644
--- a/Sunrise.pm
+++ b/Sunrise.pm
@@ -615,6 +615,7 @@ sub sun_rise
    my $offset = int( shift || 0 );
 
    my $today = DateTime-&gt;today-&gt;set_time_zone( 'local' );
+   $today-&gt;set( hour =&gt; 12 );
    $today-&gt;add( days =&gt; $offset );
 
    my( $sun_rise, undef ) = sunrise( $today-&gt;year, $today-&gt;mon, $today-&gt;mday,
@@ -667,6 +668,7 @@ sub sun_set
    my $offset = int( shift || 0 );
 
    my $today = DateTime-&gt;today-&gt;set_time_zone( 'local' );
+   $today-&gt;set( hour =&gt; 12 );
    $today-&gt;add( days =&gt; $offset );
 
    my( undef, $sun_set ) = sunrise( $today-&gt;year, $today-&gt;mon, $today-&gt;mday,
diff --git a/t/03dst.t b/t/03dst.t
new file mode 100755
index 0000000..13b20af
--- /dev/null
+++ b/t/03dst.t
@@ -0,0 +1,36 @@
+#!/usr/bin/perl -w
+# -*- perl -*-
+
+#
+# Author: Slaven Rezic
+#
+
+use strict;
+use Test::More;
+
+if (!eval q{ require Time::Fake; 1;}) {
+    print "1..0 # skip no Time::Fake module\n";
+    exit;
+}
+
+my @tests = (
+	     [1288545834, 'sun_rise', '07:00'],
+	     [1288545834, 'sun_set',  '16:39'],
+
+	     [1269738800, 'sun_rise', '06:49'],
+	     [1269738800, 'sun_set',  '19:33'],
+	    );
+
+plan tests =&gt; scalar @tests;
+
+for my $test (@tests) {
+    my($epoch, $func, $expected) = @$test;
+    my @cmd = ($^X, "-Mblib", "-MTime::Fake=$epoch", "-MAstro::Sunrise", "-e", "print $func(13.5,52.5)");
+    open my $fh, "-|", @cmd or die $!;
+    local $/;
+    my $res = &lt;$fh&gt;;
+    close $fh or die "Failure while running @cmd: $!";
+    is $res, $expected, "Check for $func at $epoch";
+}
+
+__END__
</pre></body></html>