|
Posted by Mike Knight on 07/07/06 05:49
I suggest you read the php manual entry for the date() command
http://php.net/date
You can specify a timestamp for date() to use. You can use time() to
return the current time stamp, and add or subtract to it to get to the
right time zone. time() returns an integer which is referred to as a
unix timestamp. The number is in seconds, so you can add/subtract
seconds to change the time.
echo date("H:i:s",time()+7200); //7200 seconds == 2 hours
Hoopster wrote:
> I'm creating a script to include time.
>
>
> Here is my code.
>
> <?php
> echo date("H:i:s");
> ?>
>
>
> However, my server is 2 hours difference from me. What is the exact
> command that I can use to offset it.
>
>
> Please provide me with an exact code change as I'm new at this.
>
>
> Thanks
Navigation:
[Reply to this message]
|