这里主要使用strftime函数实现这一功能,代码很简单,如下所示:
$today = date('Y-m-d-G'); $today = strftime("%Y-%m-%d-%H",strtotime("$today -5 hour"));
希望本文所述对大家的php程序设计有所帮助。