Reply to Re: Time help

Your name:

Reply:


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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация