tags:

views:

235

answers:

5
+2  Q: 

Time Zones

I know this isn't specific to PHP, but what's the point of using timezones listed like this :http://us2.php.net/manual/en/timezones.america.php? For example "America/Indianapolis" and "America/New_York". What is the problem with EST, EDT, CST, CDT, &c?

A: 

http://us2.php.net/date_default_timezone_set

Quote from page: Note: Since PHP 5.1.0 (when the date/time functions were rewritten), every call to a date/time function will generate a E_NOTICE if the timezone isn't valid, and/or a E_STRICT message if using the system settings or the TZ environment variable.

Andrei Serdeliuc
+1  A: 

Time zones or daylight savings time start/end dates of cities might change (it did occur in the past) but the cities are likely to remain at the same location.

DrJokepu
+3  A: 

This is just a different timezone format provided by the Zoneinfo database:

The time zones in the database are given uniform names, such as “America/New_York”, in an attempt to make them easier to understand by humans and to remove ambiguity.

Andrew Hare
+3  A: 

'America/New_York' doesn't depend on the date. While EST is only valid in winter, while in summer you have to change it to EDT. Other problem with 3 letter codes is, that there are conflicts. EST means Eastern Standard Time, but it might be in America or Australia.

vartec
I believe in the US it's <b>Eastern</b> Standard Time (EST), and in Australia it's Australian Eastern Standard Time (AEST). It is likely, however, that there are other abbreviation collisions.
Patrick McDonald
«Central Summer Time (CST) or Central Daylight Time (CDT), possibly with "Australia" prefixed (ACST or ACDT). The time in the southeastern states become UTC+11, using "Eastern" in the time zone name rather than "Central", with the abbreviations being EST, EDT, AEST, or AEDT.»
vartec
«In domestic contexts the leading "Australian" is often dropped»
vartec
+ because the conflicts concern is correct. There are quite a few, if you read the entire list.
benc
Also, unless your design has an explicitly local or regional scope, you should be avoiding using the abbreviated time zone acronyms (iCalendar calls this a "TZNAME"), and you should use the more explicit "Area/Location" format (iCalendar calls this "TZID").Be careful here, often your context is global and you won't realize it until later.
benc
A: 

All regions within a timezone don't follow the same rules. For example, Arizona does not observe Daylight Saving Time.

geetee