开发者

problem with mktime and timezone

I would like to display the time stamp of 00:00:00 1 Nov 2010 with the code as below

$day = mktime(0,0,0,11,1,2010);

However, it always display the wrong timestamp from what I intended. For example,

date('h m s d m y', $day);

will return '12 11 00 01 11 10'

It always behind 12hr and 11开发者_运维技巧min. May I know what went wrong? How to rectify? Thanks..


You are using the wrong date format string. Check out the man page for the correct format string options.

For your example you probably want date('H i s d m y',$day)


print(date('H i s d m y', mktime(0,0,0,11,1,2010))); is what you want I guess

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜