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.
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.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With