<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[17637] trunk: Remove PHP4 timezone support.</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/17637">17637</a></dd>
<dt>Author</dt> <dd>ryan</dd>
<dt>Date</dt> <dd>2011-04-13 17:30:02 +0000 (Wed, 13 Apr 2011)</dd>
</dl>

<h3>Log Message</h3>
<pre>Remove PHP4 timezone support. Props hakre. fixes <a href="http://trac.wordpress.org/ticket/16970">#16970</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminoptionsgeneralphp">trunk/wp-admin/options-general.php</a></li>
<li><a href="#trunkwpincludesdeprecatedphp">trunk/wp-includes/deprecated.php</a></li>
<li><a href="#trunkwpincludesfunctionsphp">trunk/wp-includes/functions.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminoptionsgeneralphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/options-general.php (17636 => 17637)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/options-general.php        2011-04-13 17:11:35 UTC (rev 17636)
+++ trunk/wp-admin/options-general.php        2011-04-13 17:30:02 UTC (rev 17637)
</span><span class="lines">@@ -135,45 +135,7 @@
</span><span class="cx"> &lt;?php } ?&gt;
</span><span class="cx"> &lt;tr&gt;
</span><span class="cx"> &lt;?php
</span><del>-if ( !wp_timezone_supported() ) : // no magic timezone support here
-?&gt;
-&lt;th scope=&quot;row&quot;&gt;&lt;label for=&quot;gmt_offset&quot;&gt;&lt;?php _e('Timezone') ?&gt; &lt;/label&gt;&lt;/th&gt;
-&lt;td&gt;
-&lt;select name=&quot;gmt_offset&quot; id=&quot;gmt_offset&quot;&gt;
-&lt;?php
</del><span class="cx"> $current_offset = get_option('gmt_offset');
</span><del>-$offset_range = array (-12, -11.5, -11, -10.5, -10, -9.5, -9, -8.5, -8, -7.5, -7, -6.5, -6, -5.5, -5, -4.5, -4, -3.5, -3, -2.5, -2, -1.5, -1, -0.5,
-        0, 0.5, 1, 1.5, 2, 2.5, 3, 3.5, 4, 4.5, 5, 5.5, 5.75, 6, 6.5, 7, 7.5, 8, 8.5, 8.75, 9, 9.5, 10, 10.5, 11, 11.5, 12, 12.75, 13, 13.75, 14);
-foreach ( $offset_range as $offset ) {
-        if ( 0 &lt; $offset )
-                $offset_name = '+' . $offset;
-        elseif ( 0 == $offset )
-                $offset_name = '';
-        else
-                $offset_name = (string) $offset;
-
-        $offset_name = str_replace(array('.25','.5','.75'), array(':15',':30',':45'), $offset_name);
-
-        $selected = '';
-        if ( $current_offset == $offset ) {
-                $selected = &quot; selected='selected'&quot;;
-                $current_offset_name = $offset_name;
-        }
-        echo &quot;&lt;option value=\&quot;&quot; . esc_attr($offset) . &quot;\&quot;$selected&gt;&quot; . sprintf(__('UTC %s'), $offset_name) . '&lt;/option&gt;';
-}
-?&gt;
-&lt;/select&gt;
-&lt;?php _e('hours'); ?&gt;
-&lt;span id=&quot;utc-time&quot;&gt;&lt;?php printf(__('&lt;abbr title=&quot;Coordinated Universal Time&quot;&gt;UTC&lt;/abbr&gt; time is &lt;code&gt;%s&lt;/code&gt;'), date_i18n( $time_format, false, 'gmt')); ?&gt;&lt;/span&gt;
-&lt;?php if ($current_offset) : ?&gt;
-        &lt;span id=&quot;local-time&quot;&gt;&lt;?php printf(__('UTC %1$s is &lt;code&gt;%2$s&lt;/code&gt;'), $current_offset_name, date_i18n($time_format)); ?&gt;&lt;/span&gt;
-&lt;?php endif; ?&gt;
-&lt;br /&gt;
-&lt;span class=&quot;description&quot;&gt;&lt;?php _e('Unfortunately, you have to manually update this for daylight saving time. The PHP Date/Time library is not supported by your web host.'); ?&gt;&lt;/span&gt;
-&lt;/td&gt;
-&lt;?php
-else: // looks like we can do nice timezone selection!
-$current_offset = get_option('gmt_offset');
</del><span class="cx"> $tzstring = get_option('timezone_string');
</span><span class="cx"> 
</span><span class="cx"> $check_zone_info = true;
</span><span class="lines">@@ -250,7 +212,6 @@
</span><span class="cx"> &lt;?php endif; ?&gt;
</span><span class="cx"> &lt;/td&gt;
</span><span class="cx"> 
</span><del>-&lt;?php endif; ?&gt;
</del><span class="cx"> &lt;/tr&gt;
</span><span class="cx"> &lt;tr&gt;
</span><span class="cx"> &lt;th scope=&quot;row&quot;&gt;&lt;?php _e('Date Format') ?&gt;&lt;/th&gt;
</span></span></pre></div>
<a id="trunkwpincludesdeprecatedphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/deprecated.php (17636 => 17637)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/deprecated.php        2011-04-13 17:11:35 UTC (rev 17636)
+++ trunk/wp-includes/deprecated.php        2011-04-13 17:30:02 UTC (rev 17637)
</span><span class="lines">@@ -2618,4 +2618,18 @@
</span><span class="cx">         _deprecated_function( __FUNCTION__, '3.2' );
</span><span class="cx"> 
</span><span class="cx">         return clone $object;
</span><del>-}
</del><span class="cx">\ No newline at end of file
</span><ins>+}
+
+/**
+ * Check for PHP timezone support
+ *
+ * @since 2.9.0
+ * @deprecated 3.2
+ *
+ * @return bool
+ */
+function wp_timezone_supported() {
+        _deprecated_function( __FUNCTION__, '3.2' );

+        return true;
+}
</ins></span></pre></div>
<a id="trunkwpincludesfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/functions.php (17636 => 17637)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/functions.php        2011-04-13 17:11:35 UTC (rev 17636)
+++ trunk/wp-includes/functions.php        2011-04-13 17:30:02 UTC (rev 17637)
</span><span class="lines">@@ -120,7 +120,7 @@
</span><span class="cx">         }
</span><span class="cx">         $timezone_formats = array( 'P', 'I', 'O', 'T', 'Z', 'e' );
</span><span class="cx">         $timezone_formats_re = implode( '|', $timezone_formats );
</span><del>-        if ( preg_match( &quot;/$timezone_formats_re/&quot;, $dateformatstring ) &amp;&amp; wp_timezone_supported() ) {
</del><ins>+        if ( preg_match( &quot;/$timezone_formats_re/&quot;, $dateformatstring ) ) {
</ins><span class="cx">                 $timezone_string = get_option( 'timezone_string' );
</span><span class="cx">                 if ( $timezone_string ) {
</span><span class="cx">                         $timezone_object = timezone_open( $timezone_string );
</span><span class="lines">@@ -4062,9 +4062,6 @@
</span><span class="cx">  * @return float|bool
</span><span class="cx">  */
</span><span class="cx"> function wp_timezone_override_offset() {
</span><del>-        if ( !wp_timezone_supported() ) {
-                return false;
-        }
</del><span class="cx">         if ( !$timezone_string = get_option( 'timezone_string' ) ) {
</span><span class="cx">                 return false;
</span><span class="cx">         }
</span><span class="lines">@@ -4078,27 +4075,6 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> /**
</span><del>- * Check for PHP timezone support
- *
- * @since 2.9.0
- *
- * @return bool
- */
-function wp_timezone_supported() {
-        $support = false;
-        if (
-                function_exists( 'date_create' ) &amp;&amp;
-                function_exists( 'date_default_timezone_set' ) &amp;&amp;
-                function_exists( 'timezone_identifiers_list' ) &amp;&amp;
-                function_exists( 'timezone_open' ) &amp;&amp;
-                function_exists( 'timezone_offset_get' )
-        ) {
-                $support = true;
-        }
-        return apply_filters( 'timezone_support', $support );
-}
-
-/**
</del><span class="cx">  * {@internal Missing Short Description}}
</span><span class="cx">  *
</span><span class="cx">  * @since 2.9.0
</span></span></pre>
</div>
</div>

</body>
</html>