Skip to content

Instantly share code, notes, and snippets.

@mgirouard
Created August 4, 2010 04:58
Show Gist options
  • Save mgirouard/507667 to your computer and use it in GitHub Desktop.
Save mgirouard/507667 to your computer and use it in GitHub Desktop.
<?php
/*
Plugin Name: Show Server Time
Description: Shows the current server time when scheduling posts. This is helpful when there is a time difference between your local computer and the remote server
Version: 0
Author: Michael Girouard
Author URI: http://www.lovemikeg.com/
*/
add_action('post_submitbox_misc_actions', 'mg_show_servertime');
function mg_show_servertime()
{
?>
<script>
jQuery(function ($) {
$('a[href="#edit_timestamp"]').click(function (ev) {
$('#mg-display-servertime').slideToggle();
});
});
</script>
<p id="mg-display-servertime" class="updated" style="display:none; margin:10px 5px 0">
Local Time is <?php echo date(get_option('time_format') . ' ' . get_option('date_format')) ?>
</p>
<?php
}
@DanSheldon
Copy link

Happy Birthday!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment