Jump to content

time()


Sheep

Recommended Posts

Check your system time. The time function returns the current time of the server it is on. I am not farmiliar with apache, but does apache have it's own internal clock???

If you cannot find it you could use this to adjust it

[code]<?
// get current server time
$servtime = time();
// get required offset in seconds
$offset = 60*60;  //60*60 = 3600 seconds or 1 hour
// put them together
$currenttime = $servtime + $offset;
// Format it to your liking
$formatted_time = date("m/d/Y H:i:s", $currenttime);
// Echo it out
echo $formatted_time;
?>[/code]

Damn!! Apoc beat me to it :)

Ray
Link to comment
https://forums.phpfreaks.com/topic/7711-time/#findComment-28130
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.