Jump to content

[SOLVED] date_default_timezone_set not working


chmpdog

Recommended Posts

hey,

 

On my site, I have a countdown script that counts down to a specific time. [user the time() function] Now I always want it to countdown in eastern time so I put in te code:

date_default_timezone_set ("America/New_York");

but if I change the time on my computer it effects the countdown script.

 

How do I set my server time to EDT?

 

Thanks

but if I change the time on my computer it effects the countdown script.

Ermm.. thats weird you must be using some javascript!

 

can you post your script

 

How do I set my server time to EDT?

type date to see the current date

use the command

"date" from the terminal

IE

Thu Feb 16 10:33:56 PST 2009

 

Then, to change it, type this:

date --set='Thu Feb 16 08:33:56 PST 2009'

What php version and what is your actual code.

 

The time zone setting only affects functions like date, mktime, strtotime... when they convert to/from a Unix Timestamp. Changing the actual time on your computer changes the Unix timestamp value because the time is no longer the correct number of seconds since Unix Epoch.

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.