tags:

views:

277

answers:

1

Alright, quick question.

A server is running in Eastern Time. PHP program needs to make date calculations using Central time.

At the moment, I am putting this line at the very top of my script:

putenv("TZ=US/Central");

Is that the best way to go about that or is there some PHP trick I'm not aware of?

Cheers.

+4  A: 

You can use date_default_timezone_set and all the date/time functions in the script will use it.

CMS