Reply to Re: PHP Time Question

Your name:

Reply:


Posted by ZeldorBlat on 08/21/06 20:48

John wrote:
> Is it possible to have some .php file run on my host so that I can
> display PST and not the servers EST when a php script is run. I don't
> want to find the code on all of my scripts and make adjustments.
>
>
> I know the command:
>
>
> $currentTime=time()-(3*60*60);
>
>
>
> But not sure what script to use it on. Do I use it on the one
> displaing the time?

time() returns a timestamp, which is always in UTC. What you really
want to do is call date_default_timezone_set() before calling date()
when you display the time. No other adjustments are necessary.

[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

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