Perl DateTime "is_dst()" method not working correctly
<p>I'm trying to use the <code>is_dst()</code> method in the <code>DateTime</code> module to determine whether a daylight savings transition is occurring.</p>

<p>I started by writing a very basic example that I was <em>sure</em> would work, but for some reason I'm getting unexpected results.</p>

<hr>

<p><strong>Example:</strong></p>

<pre><code>#!/usr/bin/perl

use strict;
use warnings;
use DateTime;

my $dt1 = DateTime-&gt;new(
    'year'  =&gt; 2015,
    'month' =&gt; 3   ,
    'day'   =&gt; 8   ,
    'hour'  =&gt; 3   ,
);

my $dt2 = DateTime-&gt;new(
    'year'  =&gt; 2015,
    'month' =&gt; 3   ,
    'day'   =&gt; 7   ,
    'hour'  =&gt; 3   ,
);

print $dt1."\n";
print $dt2."\n";
print $dt1-&gt;is_dst()."\n";
print $dt2-&gt;is_dst()."\n";
</code></pre>

<blockquote>
  <p>I started with a date that I knew was a daylight savings transition: <strong>Sunday, March 8, 2015</strong>.  I chose <strong>3 AM</strong> because I knew that the daylight savings transition would have already occured at that point in time.</p>
  
  <p>Then I took a date that I knew was before the daylight savings transition: <strong>Saturday, March 7, 2015</strong> also at <strong>3 AM</strong>.</p>
  
  <p>Then I print the two dates and their corresponding DST flags.</p>
</blockquote>

<p><strong>Output:</strong></p>

<pre><code>2015-03-08T03:00:00
2015-03-07T03:00:00
0
0
</code></pre>

<hr>

<p>The two dates print exactly as expected, but for some reason even though the first date occurs during daylight savings time, and the second date occurs before daylight savings time, the DST flag is not set for both of them.</p>

<p>Why is this not working correctly?  Am I missing something?</p>