PHP date()函数的分钟数错误...为什么? [英] Php date() function gets wrong minutes... why?

查看:128
本文介绍了PHP date()函数的分钟数错误...为什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Php中的一个项目中工作,我注意到该日期(以及时间)返回错误的时间. 最初似乎是错误的时区,但是后来我注意到与系统时钟之间没有一个或多个小时的差异(我在本地主机上工作),而是大约28分钟的时间. ?

I was working with a project in Php and I noticed that date (and time too) return wrong time. At first it seemed the wrong timezone, but later I noticed that there is not one or more hours of difference (I'm working on localhost) with system clock, but about 28 minutes... That's weird.. what could it possibly be?

推荐答案

如果几分钟内使用"M"或"m",则实际上是在显示月份. "i"用了几分钟.

If you're using "M" or "m" for minutes, then you're actually displaying month of year. "i" is used for minutes.

这篇关于PHP date()函数的分钟数错误...为什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆