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 11min. 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
제휴하지 않습니다 StackOverflow