...

View Full Version : TimeZone For Atlanta



phantom007
01-11-2010, 06:12 AM
Hello


I was wondering what setting I have to put in my PHP script so that I can get my timezone set to Atlanta (http://www.timeanddate.com/worldclock/city.html?n=25)

I dont seem to find it on the php.net site (http://www.php.net/manual/en/timezones.america.php)

Thanks

seco
01-11-2010, 07:07 AM
use a "major city" like


<?php
date_default_timezone_set('America/New_York');
echo date('D,F j, Y, h:i:s A');
?>

or even try


<?php
date_default_timezone_set('America/Atlanta');
echo date('D,F j, Y, h:i:s A');
?>

cant tell you if it works with atlanta but its worth a shot

phantom007
01-11-2010, 08:21 AM
hey America/New_York worked, thanks :)

phantom007
01-11-2010, 08:42 AM
Question:

It works fine on my localhost but when I upload the same code, it shows me a time which is off by 1 hour.

Any idea whats happening?

oracleguy
01-11-2010, 08:55 AM
Maybe it isn't accounting for daylight savings properly?

phantom007
01-11-2010, 01:48 PM
Assuming that is the case, How do fix it then?

phantom007
01-19-2010, 06:40 AM
Any update on this will be appreciated :thumbsup:

phantom007
01-27-2010, 06:28 AM
Question: How do I maintain daylight savings using php?

Len Whistler
01-27-2010, 06:36 AM
Question: How do I maintain daylight savings using php?

I don't know much about the php time zone function but I assume you would have to create an if statement. If the current date is between the dates that daylight savings is in affect then you add the hour, or subtract.



------

phantom007
01-27-2010, 07:13 AM
I don't know much about the php time zone function but I assume you would have to create an if statement. If the current date is between the dates that daylight savings is in affect then you add the hour, or subtract.



------


Hi

I dont want to sound like a nerd but can you please tell me what is a "daylight saving"?

Len Whistler
01-27-2010, 07:19 AM
Hi

I dont want to sound like a nerd but can you please tell me what is a "daylight saving"?

That's when the clocks are moved forward - or backward - one hour to give us extra sunlight during the winter. I think it's from October to April. Some Countries don't bother with it.



----



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum