<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.2" -->
<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>Comments on: Timezones in PHP.</title>
	<link>http://blog.firetree.net/2006/10/03/timezones-in-php/</link>
	<description>Sharing useful things with the world.</description>
	<pubDate>Thu, 24 Jul 2008 09:39:30 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.2</generator>
		<item>
		<title>By: Giles</title>
		<link>http://blog.firetree.net/2006/10/03/timezones-in-php/#comment-8210</link>
		<dc:creator>Giles</dc:creator>
		<pubDate>Mon, 12 Mar 2007 18:40:14 +0000</pubDate>
		<guid>http://blog.firetree.net/2006/10/03/timezones-in-php/#comment-8210</guid>
		<description>&lt;p&gt;It would probably be an improvement to clean it up with a couple of helper functions - since the PHP documentation indicates that the 5.1.x functions offer more functionality than the getenv() option.  Then at least 5.1.x users have the advantage of the built-in functionality.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;function custom_timezone_set( $tz )
{
    if (function_exists('date_default_timezone_set')) {
        date_default_timezone_set( $tz );
    }
    else {
        putenv("TZ=$tz");
    }
}

function custom_timezone_get()
{
    if (function_exists('date_default_timezone_get')) {
        date_default_timezone_get();
    }
    else {
        getenv("TZ");
    }
}
&lt;/code&gt;&lt;/pre&gt;
</description>
		<content:encoded><![CDATA[<p>It would probably be an improvement to clean it up with a couple of helper functions - since the PHP documentation indicates that the 5.1.x functions offer more functionality than the getenv() option.  Then at least 5.1.x users have the advantage of the built-in functionality.</p>

<pre><code>function custom_timezone_set( $tz )
{
    if (function_exists('date_default_timezone_set')) {
        date_default_timezone_set( $tz );
    }
    else {
        putenv("TZ=$tz");
    }
}

function custom_timezone_get()
{
    if (function_exists('date_default_timezone_get')) {
        date_default_timezone_get();
    }
    else {
        getenv("TZ");
    }
}
</code></pre>]]></content:encoded>
	</item>
</channel>
</rss>
