Home  >  Article  >  php教程  >  php date()转换mktime()成可读日期

php date()转换mktime()成可读日期

WBOY
WBOYOriginal
2016-06-13 11:18:35883browse

 

php教程 date()转换mktime()成可读日期

date/time 函数允许您提取并格式化服务器上的日期和时间

mktime() 函数返回一个日期的 unix 时间戳。

参数总是表示 gmt 日期,因此 is_dst 对结果没有影响。

参数可以从右到左依次空着,空着的参数会被设为相应的当前 gmt 值。

语法
mktime(hour,minute,second,month,day,year,is_dst)

 

$s =1294628667;
echo date("y-m-d h:i:s",$s);


Statement:
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