Jump to content

date_default_timezone_set()


goldfiles

Recommended Posts

That's what I was thinking too, but I get the same timestamp when I run the following functions with time();

 

date_default_timezone_set("GMT");

date_default_timezone_set("America/Los_Angeles");

 

Among others...all the same timestamp.

 

I have PHP 5 enabled, too.

Interesting...according to this site, the time() function is ALWAYS in GMT time.  Then you use the date() functions to set the timezone.

 

http://keithdevens.com/weblog/archive/2004/Jul/28/Times.PHP.MySQL

 

Can someone confirm I am understanding this correctly?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.