chmpdog Posted March 27, 2009 Share Posted March 27, 2009 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 Quote Link to comment Share on other sites More sharing options...
MadTechie Posted March 27, 2009 Share Posted March 27, 2009 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' Quote Link to comment Share on other sites More sharing options...
taquitosensei Posted March 27, 2009 Share Posted March 27, 2009 it sounds like you're using javascript which would be clientside, that's why it's using the time off your computer. I found this. http://articles.techrepublic.com.com/5100-10878_11-6016329.html sounds like what you're after. Quote Link to comment Share on other sites More sharing options...
chmpdog Posted March 28, 2009 Author Share Posted March 28, 2009 nope, no javascript. Its all php and html. I was sure because I knew the issues w/ javascript when I made it Quote Link to comment Share on other sites More sharing options...
chmpdog Posted March 28, 2009 Author Share Posted March 28, 2009 wait. would it effect the date if it is a local server? Im using wamp. PS: Thanks for all the replies Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted March 28, 2009 Share Posted March 28, 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. Quote Link to comment Share on other sites More sharing options...
chmpdog Posted March 28, 2009 Author Share Posted March 28, 2009 I figured it out.. It was my local server. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.