patch shop_order.php for issue 2958

adds ` UTC` to the variable passed to `strtotime` to ensure that the `strtotime` function does not assume the local timezone when converting.
This commit is contained in:
Ben Gummer 2013-04-15 21:02:19 +10:00
parent 6924817c22
commit ddd92141bf
1 changed files with 2 additions and 2 deletions

View File

@ -132,7 +132,7 @@ function woocommerce_custom_order_columns( $column ) {
} else {
$t_time = get_the_time( __( 'Y/m/d g:i:s A', 'woocommerce' ), $post );
$gmt_time = strtotime( $post->post_date_gmt );
$gmt_time = strtotime( $post->post_date_gmt . ' UTC' );
$time_diff = current_time('timestamp', 1) - $gmt_time;
if ( $time_diff > 0 && $time_diff < 24*60*60 )
@ -561,4 +561,4 @@ function woocommerce_delete_order_items( $postid )
}
}
add_action( 'before_delete_post', 'woocommerce_delete_order_items' );
add_action( 'before_delete_post', 'woocommerce_delete_order_items' );