<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: DateTime vs numeric timezone</title>
	<atom:link href="http://blog.milkfarmsoft.com/2007/07/datetime-vs-numeric-timezone/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.milkfarmsoft.com/2007/07/datetime-vs-numeric-timezone/</link>
	<description>Programming for Mac and Web</description>
	<lastBuildDate>Thu, 04 Aug 2011 07:10:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com" />
	<atom:link rel="hub" href="http://superfeedr.com/hubbub" />
		<item>
		<title>By: Alexey Zakhlestin&#8217;s blog &#187; Syck for PHP, 0.9.1 (aka &#8220;beta2&#8243;)</title>
		<link>http://blog.milkfarmsoft.com/2007/07/datetime-vs-numeric-timezone/comment-page-1/#comment-6868</link>
		<dc:creator>Alexey Zakhlestin&#8217;s blog &#187; Syck for PHP, 0.9.1 (aka &#8220;beta2&#8243;)</dc:creator>
		<pubDate>Sun, 15 Jul 2007 12:46:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.milkfarmsoft.com/?p=60#comment-6868</guid>
		<description>[...] added support for timestamps in syck_load (thanks to Derick for a hint) [...]</description>
		<content:encoded><![CDATA[<p>[...] added support for timestamps in syck_load (thanks to Derick for a hint) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: epaulin</title>
		<link>http://blog.milkfarmsoft.com/2007/07/datetime-vs-numeric-timezone/comment-page-1/#comment-6726</link>
		<dc:creator>epaulin</dc:creator>
		<pubDate>Thu, 12 Jul 2007 06:25:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.milkfarmsoft.com/?p=60#comment-6726</guid>
		<description>I use this as a workaound, kind of hacky:

{{{

$offset = &#039;-5&#039;;
$date = gmdate(&quot;Y-m-d H:i:s&quot;, time());

$offset = (int) $offset;

// according to the wrong RFC, Etc/GMT-N means GMT+N
if ($offset &gt; 0) {
	$offset = &#039;-&#039; . abs($offset);
} else {
	$offset = &#039;+&#039; . abs($offset);
}
$timeZoneId = &#039;Etc/GMT&#039; . $offset;

$dateTime = new DateTime($date, new DateTimeZone(&#039;UTC&#039;));
$dateTime-&gt;setTimezone(new DateTimeZone($timeZoneId));

}}}</description>
		<content:encoded><![CDATA[<p>I use this as a workaound, kind of hacky:</p>
<p>{{{</p>
<p>$offset = &#8216;-5&#8242;;<br />
$date = gmdate(&#8220;Y-m-d H:i:s&#8221;, time());</p>
<p>$offset = (int) $offset;</p>
<p>// according to the wrong RFC, Etc/GMT-N means GMT+N<br />
if ($offset &gt; 0) {<br />
	$offset = &#8216;-&#8217; . abs($offset);<br />
} else {<br />
	$offset = &#8216;+&#8217; . abs($offset);<br />
}<br />
$timeZoneId = &#8216;Etc/GMT&#8217; . $offset;</p>
<p>$dateTime = new DateTime($date, new DateTimeZone(&#8216;UTC&#8217;));<br />
$dateTime-&gt;setTimezone(new DateTimeZone($timeZoneId));</p>
<p>}}}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: indeyets</title>
		<link>http://blog.milkfarmsoft.com/2007/07/datetime-vs-numeric-timezone/comment-page-1/#comment-6702</link>
		<dc:creator>indeyets</dc:creator>
		<pubDate>Wed, 11 Jul 2007 16:36:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.milkfarmsoft.com/?p=60#comment-6702</guid>
		<description>thanks, Derickâ€¦ I was misleaded by comment at http://www.php.net/manual/en/function.date-create.php#74599

actually there still is a problemâ€¦ but it is not related to my extension.

Try this, it should be self-descriptive

&lt; ?php
date_default_timezone_set(&#039;GMT&#039;);
$date = &quot;2001-12-14T21:59:43-0500&quot;;

$dt = new DateTime($date);
var_dump($dt-&gt;getTimezone()-&gt;getName());</description>
		<content:encoded><![CDATA[<p>thanks, Derickâ€¦ I was misleaded by comment at <a href="http://www.php.net/manual/en/function.date-create.php#74599" rel="nofollow">http://www.php.net/manual/en/function.date-create.php#74599</a></p>
<p>actually there still is a problemâ€¦ but it is not related to my extension.</p>
<p>Try this, it should be self-descriptive</p>
<p>< ?php<br />
date_default_timezone_set('GMT');<br />
$date = "2001-12-14T21:59:43-0500";</p>
<p>$dt = new DateTime($date);<br />
var_dump($dt->getTimezone()->getName());</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Derick</title>
		<link>http://blog.milkfarmsoft.com/2007/07/datetime-vs-numeric-timezone/comment-page-1/#comment-6700</link>
		<dc:creator>Derick</dc:creator>
		<pubDate>Wed, 11 Jul 2007 16:19:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.milkfarmsoft.com/?p=60#comment-6700</guid>
		<description>Just use:

$dt = new DateTime( &quot;2001-12-15T02:59:43.1Z&quot; );
$dt = new DateTime( &quot;2001-12-14 21:59:43.10 -5&quot; );
$dt = new DateTime( &quot;2001-12-14 21:59:43.10 +0300&quot; );

The first argument is *not* a timestamp.</description>
		<content:encoded><![CDATA[<p>Just use:</p>
<p>$dt = new DateTime( &#8220;2001-12-15T02:59:43.1Z&#8221; );<br />
$dt = new DateTime( &#8220;2001-12-14 21:59:43.10 -5&#8243; );<br />
$dt = new DateTime( &#8220;2001-12-14 21:59:43.10 +0300&#8243; );</p>
<p>The first argument is *not* a timestamp.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

