WordPress.org

Make WordPress Core


Ignore:
Timestamp:
03/10/2009 12:50:00 AM (12 years ago)
Author:
ryan
Message:

Timezone support. Props Otto42. see #3962

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/options-general.php

    r10670 r10753  
    9494</tr>
    9595<tr>
     96<?php
     97if (!wp_timezone_supported()) : // no magic timezone support here
     98?>
    9699<th scope="row"><label for="gmt_offset"><?php _e('Timezone') ?> </label></th>
    97100<td>
     
    128131<span class="setting-description"><?php _e('Unfortunately, you have to manually update this for Daylight Savings Time. Lame, we know, but will be fixed in the future.'); ?></span>
    129132</td>
     133<?php
     134else: // looks like we can do nice timezone selection!
     135$current_offset = get_option('gmt_offset');
     136?>
     137<th scope="row"><label for="timezone_string"><?php _e('Timezone') ?></label></th>
     138<td>
     139
     140<select id="timezone_string" name="timezone_string">
     141<?php echo wp_timezone_choice(get_option('timezone_string')); ?>
     142</select>
     143
     144<span id="utc-time"><?php printf(__('<abbr title="Coordinated Universal Time">UTC</abbr> time is <code>%s</code>'), date_i18n(__('Y-m-d G:i:s'), false, 'gmt')); ?></span>
     145<?php if (get_option('timezone_string')) : ?>
     146    <span id="local-time"><?php printf(__('Current time in %1$s is <code>%2$s</code>'), get_option('timezone_string'), date_i18n(__('Y-m-d G:i:s'))); ?></span>
     147<?php endif; ?>
     148<br/>
     149<span class="setting-description"><?php _e('Choose a city in the same timezone as you.'); ?></span>
     150</td>
     151
     152<?php endif; ?>
    130153</tr>
    131154<tr>
Note: See TracChangeset for help on using the changeset viewer.