Home > php教程 > php手册 > PHP4与PHP5的时间格式问题

PHP4与PHP5的时间格式问题

WBOY
Release: 2016-06-13 12:30:07
Original
843 people have browsed it

自己电脑上用的PHP5.

服务器上PHP4.

自己机器上时间,2008-2-14 14:56:29
写好程序传上去,变成一串数字。1202972189

数据库用的access.. 字段默认值 Now()
解决方法:
这个没有问题,这个数字就是Unix timestamp,它表示自1970-1-1到现在的秒数,一般需要进行格式化显示

date('Y-m-d',1202972189)
结果就是 2008-02-14

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