This post was updated 546 days ago and some of the ideas may be out of date.

代码如下

date_default_timezone_set('Asia/Shanghai');

$time = strtotime('this week Sunday 23:59:59');
$date = date('Y-m-d H:i:s', $time);
var_dump($time, $date);