<?xml version="1.0"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>Decaflon Thread: PHP's being Ricky Retardo.</title>
<link>http://decaflon.com/notes/</link>
<description>Decaflon Thread: PHP's being Ricky Retardo.</description>
<language>en</language>
<pubDate>Fri, 09 Jan 2009 05:35:23 +0000</pubDate>

<item>
<title>PHP's being Ricky Retardo.</title>
<link>http://decaflon.com/programming/notes/15290/p/1/#response-118474</link>
<pubDate>Sat, 28 Jun 2008 00:18:05</pubDate>
<dc:creator>Scrivs</dc:creator>
<guid isPermaLink="false">118474</guid>
<description>&lt;p&gt;Glad you found the bug before me. I'll have to remember to stay away from it.
&lt;/p&gt;</description>
</item>
<item>
<title>PHP's being Ricky Retardo.</title>
<link>http://decaflon.com/programming/notes/15290/p/1/#response-118473</link>
<pubDate>Fri, 27 Jun 2008 23:02:18</pubDate>
<dc:creator>alexsuraci</dc:creator>
<guid isPermaLink="false">118473</guid>
<description>&lt;p&gt;&lt;code&gt;&amp;lt;?php&lt;br /&gt;
    $now = new DateTime(&amp;quot;now&amp;quot;, new DateTimeZone(&amp;quot;Etc/GMT-4&amp;quot;));&lt;br /&gt;
    echo $now-&amp;gt;format(&amp;quot;F jS, Y, g:i A&amp;quot;);&lt;br /&gt;
&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Guess what that outputs?&lt;/p&gt;
&lt;p&gt;If you thought &quot;June 27th, 2008, 3:00 PM&quot; (based on the time this note was posted), you'd be wrong. It actually outputs &quot;June 27th, 2008, 11:00 PM&quot;. Why? I haven't the slightest idea. That's what time it is in GMT +4, not -4.&lt;/p&gt;
&lt;p&gt;Any ideas why this is breaking so much? It seems PHP has arbitrarily switched the + and - GMT values.&lt;/p&gt;
&lt;p&gt;At first I thought it might be basing the timezone's offset off of the server's local time, which is 3:00 PM (I live in GMT -4), but 3:00 PM - 4 hours = 11 AM, not 11 PM. Colour me confused.&lt;/p&gt;
&lt;p&gt;Edit: Looks like PHP has &lt;a href=&quot;http://www.php.net/manual/en/timezones.others.php&quot;&gt;deprecated GMT timezones&lt;/a&gt; in favour of &lt;a href=&quot;http://www.php.net/manual/en/timezones.php&quot;&gt;using these&lt;/a&gt;. I guess that explains why they're broken, though it's still a colossal fuck-up.
&lt;/p&gt;</description>
</item>

</channel>
</rss>

