Home > php教程 > php手册 > body text

php 当前时间: 用php实现将当前日期时间减去一个小时

WBOY
Release: 2016-06-21 08:49:50
Original
3168 people have browsed it

date_default_timezone_set('Asia/Shanghai');//此句用于消除时间差
$nowtime=date("Y-m-d H:i:s");
echo date('Y-m-d H:i:s',strtotime("$nowtime-1 hour"));
hour小时
minute分钟
year年
month月
day日
本文链接http://www.cxybl.com/html/wlbc/Php/20130523/37995.html



Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!