If you do:
System.out.println(TimeZone.getTimeZone(("US/Eastern")));
System.out.println(TimeZone.getTimeZone(("America/New_York")));
The output is:
sun.util.calendar.ZoneInfo[id="US/Eastern",offset=-18000000,dstSavings=3600000,useDaylight=true,transitions=235,lastRule=java.util.SimpleTimeZone[id=US/Eastern,offset=-18000000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=3,startMonth=2,startDay=8,startDayOfWeek=1,startTime=7200000,startTimeMode=0,endMode=3,endMonth=10,endDay=1,endDayOfWeek=1,endTime=7200000,endTimeMode=0]]
sun.util.calendar.ZoneInfo[id="America/New_York",offset=-18000000,dstSavings=3600000,useDaylight=true,transitions=235,lastRule=java.util.SimpleTimeZone[id=America/New_York,offset=-18000000,dstSavings=3600000,useDaylight=true,startYear=0,startMode=3,startMonth=2,startDay=8,startDayOfWeek=1,startTime=7200000,startTimeMode=0,endMode=3,endMonth=10,endDay=1,endDayOfWeek=1,endTime=7200000,endTimeMode=0]]
Which shows every value that is set is exactly the same. There is no difference between the two.
However, thanks to Andreas's comment, it would be optimal to use America/New_York
instead of US/Eastern
as it is deprecated, shown here and official list here.
According to the official list on the github by the author of the database, US/Eastern
exists solely for backwards compatibility.
US/Eastern
is the Eastern zone, which is EST part of the year and EDT part of the year.ZoneId.of("US/Eastern").getRules().isDaylightSavings(Instant.parse("2019-07-01T00:00:00Z"))
returnstrue
, which it wouldn't for Eastern Standard Time.US/Eastern
is old and may be deprecated. See my edits and the other answer to the question.