Incorrect PHPInfo Date

Using PHP to echo the date correctly displays: "2012-01-04 11:04:07"

However, at the top of my phpinfo file, I have:

"System Linux server1.domain.com # 1 SMP Tue Jun 21 10:29:24 EDT 2011 i686"

Does the date show June 21 instead of January 4?

I am running Ubuntu and PHP 5.3.2.

Thank.

+5
source share
4 answers

This is not system time, it is part of your kernel version (time to create your OS kernel). There is nothing to worry about (except, perhaps check that this is an updated kernel, if you do not control the computer, do not worry about it).

If you can run system commands, you can get this by running uname -a. Output on my box:

Linux xyzzy 3.0.0-13-server #22-Ubuntu SMP Wed Nov 2 15:09:08 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

, ​​ - ( " ​​ ?" ).

: http://en.wikipedia.org/wiki/Uname

+5

, PHP , .

0

The first line in the output of phpInfo () is not the current date. This is probably the date the server was configured or s.th.th. like this.

0
source

Your PHP timezone is probably set in the php.ini file:

;;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;;;;

[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
;date.timezone =

Change this parameter correctly, and your PHP processes should return correctly.

0
source

All Articles