PHP Time Question

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
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:


But not sure what script to use it on. Do I use it on the one
displaing the time?

Re: PHP Time Question

John wrote:
Quoted text here. Click to load it

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.

Site Timeline