请问 2015-10-10 直接转换成 linux 时间戳有没有直接的函数可以转换的?
请问 2015-10-10 直接转换成 linux 时间戳有没有直接的函数可以转换的?
<code>echo strtotime('2015-10-10');</code>对于strtotime不支持的格式,比如 2015年10月1日 ,则可以:
<code>$arr = date_parse_from_format('Y年m月d日', '2015年10月1日');
echo mktime(0, 0, 0, $arr['month'], $arr['day'], $arr['year']);
//mktime 参数顺序:时,分,秒,月,日,年</code>
strtotime('2015-10-10')
strtotime('2015-10-10')
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号