[英]Check if a time in a timezone is elapsed in php?
Here's the time entered by a user CDT 2011-02-01 16:30:00这是用户输入的时间CDT 2011-02-01 16:30:00
How do i know that if that time was passed already in php?我怎么知道那个时间是否已经在 php 中过去了?
Thanks谢谢
$usertime = strtotime('CDT 2011-02-01 16:30:00');
if (time() > $usertime) echo 'time passed';
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.