Decode request_time into readable timestamp

Views: 120 Last modified: August 03rd, 2011 Comments: 0

Since $_SERVER['REQUEST_TIME'] returns a UNIX timestamp in seconds from Jan 1, 1970, you must decode it before showing the actual current timestamp.

$Request_Time = $_SERVER['REQUEST_TIME'];
echo date('Y-d-m H:i:s', $Request_Time);

This will output something like:

2010-22-10 16:19:04.
VN:F [1.9.13_1145]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.13_1145]
Rating: 0 (from 0 votes)

    Mail this!

    To: From:Sum {0+8} =  
    Anything to add ?

        You must be logged in to post a comment.