mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Prevent double timezone offset when saving titleless AJAX-created drafts. fixes #3701
git-svn-id: http://svn.automattic.com/wordpress/trunk@4882 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0462e6f4ca
commit
629e270a8e
@ -155,7 +155,7 @@ case 'add-meta' :
|
||||
if ( !current_user_can( 'edit_post', $id ) )
|
||||
die('-1');
|
||||
if ( $id < 0 ) {
|
||||
$now = current_time('timestamp');
|
||||
$now = current_time('timestamp', 1);
|
||||
if ( $pid = wp_insert_post( array(
|
||||
'post_title' => sprintf('Draft created on %s at %s', date(get_option('date_format'), $now), date(get_option('time_format'), $now))
|
||||
) ) )
|
||||
|
Loading…
Reference in New Issue
Block a user