Default timezone hardcoded as UTC?

Somehow I missed the current_time function, which gives a good description of the situation and how to properly deal with the need to get the current blog-local time. http://codex.wordpress.org/Function_Reference/current_time Though the purist in me still hates how WP makes the time zone setting in php.ini obsolete without giving you a choice. *grumble grumble*

What’s the difference between get_the_time and get_the_date?

They are, very similar but with some nuances: function get_the_date( $d = ” ) { global $post; $the_date=””; if ( ” == $d ) $the_date .= mysql2date(get_option(‘date_format’), $post->post_date); else $the_date .= mysql2date($d, $post->post_date); return apply_filters(‘get_the_date’, $the_date, $d); } function get_the_time( $d = ”, $post = null ) { $post = get_post($post); if ( ” == … Read more

Proper formatting of post_date for wp_insert_post?

If you don’t add a post_date then WordPress fills it automatically with the current date and time. To set another date and time [ Y-m-d H:i:s ] is the right structure. An example below with your code. $postdate=”2010-02-23 18:57:33″; $new_post = array( ‘post_title’ => $title, ‘post_content’ => $description, ‘post_date’ => $postdate, ‘post_status’ => ‘publish’, ‘post_parent’ … Read more