📜  在 php 代码示例中获取数据前 2 小时

📅  最后修改于: 2022-03-11 14:54:11.740000             🧑  作者: Mango

代码示例1
//set timezone
date_default_timezone_set('Asia/Kolkata');

//set an date and time to work with
$start = '2014-06-01 14:00:00';
echo date('Y-m-d H:i',strtotime('+1 hour +20 minutes',strtotime($start)));