[ACCEPTED]-Arizona TimeZone Day Light Saving-dst

Accepted answer
Score: 11

Arizona is in the Mountain timezone, but doesn't observe DST. If you specify the timezone 34 "US/Mountain", then the computer 33 will apply the rules used by most states 32 in the Mountain time zone, which include 31 observing daylight savings time. To get 30 the rules for Arizona (which don't include 29 DST), you want the timezone "US/Arizona" (or 28 "America/Phoenix"). In the Navajo 27 nation, you want the timezone named "Navajo".

To 26 save yourself some of the trouble, always 25 try to use the names from "America/*" where 24 you can pick the name of a city that has 23 the same timezone rules as the place you're 22 interested in.

To get the correct time in 21 the correct timezone for any given city 20 in the world, you simply have to familiarize 19 yourself with the names in the Olson timezone 18 database and their meanings. While you usually 17 think of the term "time zone" to 16 mean the time of day in the middle of the 15 winter (when everybody observes standard 14 time), in the Olson database a timezone 13 name represents the entire history of daylight 12 savings time rules and timezone rules for 11 a particular region.

As an example, even 10 though Indiana now observes Eastern time and observes DST (except for a few counties right 9 near Chicago which are on Central time like 8 Chicago), before 2006 they didn't observe 7 DST. A timezone named "US/Indiana" (or 6 "America/Indianapolis") was created 5 to cover this region, an even today, you 4 would still want to use the timezone "America/Indianapolis" when 3 talking about Indiana, so that queries about 2 dates and times before 2006 could be answered 1 correctly.

Score: 3

Most of Arizona does not observe Daylight 2 Savings Time, but the Navajo Nation inside 1 Arizona does observe DST.

Score: 1

The zone information can be obtained directly 7 for many major cities worldwide. This includes 6 Phoenix, which has the zone identifier "America/Phoenix".

You 5 can find the list of available zone identifiers 4 using the method TimeZone.getAvailableIDs() or by manually inspecting 3 the contents of the JRE lib/zi directory.

As other 2 posters have noted, the "US/Arizona" zone 1 information is distinct from "US/Mountain".

Score: 1

I am providing the modern answer. Don’t 16 use the classes Calendar, GregorianCalendar, TimeZone and Date. They are all 15 poorly designed and fortunately all long 14 outdated.


It’s simple when you know how:

    ZonedDateTime arizonaExceptNavajo = ZonedDateTime.now(ZoneId.of("America/Phoenix"));

When 13 I ran this code just now, the output was:


The 12 US/Mountain time zone ID is deprecated. It’s 11 a link to America/Denver, and America/Denver 10 does use summer time (daylight saving time, DST). Modern 9 time zone IDs have the form region/city where region is either 8 a continent like America or an ocean like 7 Pacific.

As others have said, summer time 6 is used on one place in Arizona, the Navajo 5 Nation. The Navajo time zone ID mentioned is deprecated 4 too. Use America/Denver:

    ZonedDateTime navajoNation = ZonedDateTime.now(ZoneId.of("America/Denver"));


Since 3 summer time is still in effect, the time 2 of day is one hour ahead compared to the 1 one for Phoenix above.


More Related questions