<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Fri, 24 May 2013 20:12:38 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Daniel Cousineau's Blog: Calculating Daylight Savings Time Boundary In PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/12115</guid>
      <link>http://www.phpdeveloper.org/news/12115</link>
      <description><![CDATA[<p>
<i>Daniel Cousineau</i> has written up some timely advice in <a href="http://www.toosweettobesour.com/2009/03/10/calculating-daylight-savings-time-boundary-in-php/">a new post</a> to his blog. It looks at pinpointing the time boundary for Daylight Savings Time in a PHP script (when it starts and when it ends).
</p>
<blockquote>
I had an issue recently where I needed to calculate the Unix timestamp for the daylight savings time boundaries. According to the <a href="http://aa.usno.navy.mil/faq/docs/daylight_time.php">United States Naval Observatory</a>, daylight savings time begins the Second Sunday of March and ends on the First Sunday of November.
</blockquote>
<p>
He looks at using the <a href="http://php.net/strtotime">strtotime</a> function to calculate these dates but points out some quirks - like what happens when you just give it a month or something like "second Sunday". His solution was to go back one day ("March 0" instead of "March 1") and calculating the time from there, including that first full day of March in the calculation.
</p>]]></description>
      <pubDate>Wed, 11 Mar 2009 12:02:15 -0500</pubDate>
    </item>
  </channel>
</rss>
