• Resolved sandrayin

    (@sandrayin)


    Hi,

    I have added minute into the array in the php, but when I set the requirement to delete posts after 5 minute(s), the posts are not deleted. Only when I purposely change the date to old dates, then it will work. Please help.

Viewing 1 replies (of 1 total)
  • Thread Starter sandrayin

    (@sandrayin)

    Found the solution. It is due to my virtual machine timezone is not the same as my local computer time. So I added in date_default_timezone_set('Asia/Kuala_Lumpur'); in auto-prune-posts.php

    foreach ($myposts AS $post) {
    	date_default_timezone_set('Asia/Kuala_Lumpur');
    	$post_date_plus_visibleperiod = strtotime($post->post_date . " +" . $period_php);
    	$now = strtotime("now");
Viewing 1 replies (of 1 total)
  • The topic ‘Cannot delete by minute’ is closed to new replies.