$bean->StopTime=date("Y-m-d H:i:s");// 当前时间


$one = strtotime($bean->StartTime);
$tow = strtotime($bean->StopTime);
$len = $tow - $one;      //得出时间戳差值
$bean->TimeLen=$len; //时间差  秒

 

date_default_timezone_set('asia/chongqing');  //系统时间 差8小时 问题

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-27
  • 2022-12-23
  • 2021-12-18
  • 2022-12-23
  • 2022-12-23
  • 2022-02-01
猜你喜欢
  • 2022-12-23
  • 2021-09-12
  • 2021-11-30
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案