Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHPInfo Wrong Date

Tags:

date

php

Using PHP echoing 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"

The date is showing Jun 21st instead of Jan 4th?

I am running Ubuntu and PHP 5.3.2.

Thanks.

like image 772
user663561 Avatar asked Jan 04 '12 16:01

user663561


People also ask

Why is the date wrong in PHP?

The timezone of the system could be wrong. This results in a shift in a time given by the PHP date() function, althought both php date. timezone (in php. ini) and system time of the server are correct.

What is phpinfo() function?

Because every system is setup differently, phpinfo() is commonly used to check configuration settings and for available predefined variables on a given system. phpinfo() is also a valuable debugging tool as it contains all EGPCS (Environment, GET, POST, Cookie, Server) data.


1 Answers

That is not the system time, that's a part of your kernel version (the time your OS's kernel was made). Nothing to be worried about (except perhaps check if that's an up-to-date kernel; if you're not administering the computer, don't worry about it).

If you can run system commands, you can get this by running uname -a. The 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

This only means that the kernel was built two months ago - this has no bearing on current time (only in the sense of "how old is the core of my OS?").

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

like image 119
Piskvor left the building Avatar answered Nov 15 '22 10:11

Piskvor left the building