Why would the TimeZoneInfo class in .NET show that Indiana observes daylight savings time? I thought that parts of Indiana where EST all the time. Should I be using something other than “US Eastern Standard Time” to represent those parts of Indiana that don’t observe DST?
Dim timeZones As New List(Of String)()
With timeZones
.Add("Eastern Standard Time") ' Eastern TZ, except parts of Indiana
.Add("US Eastern Standard Time") ' parts of Indiana?
End With
For Each tz In timeZones
Dim tzi As TimeZoneInfo = TimeZoneInfo.FindSystemTimeZoneById(tz)
buf.AppendLine(tz)
buf.AppendFormat("SupportsDaylightSavingTime: {0}", tzi.SupportsDaylightSavingTime).AppendLine()
buf.AppendFormat("DisplayName: {0}", tzi.DisplayName).AppendLine()
buf.AppendFormat("StandardName: {0}", tzi.StandardName).AppendLine()
buf.AppendFormat("DaylightName: {0}", tzi.DaylightName).AppendLine()
buf.AppendFormat("IsDaylightSavingTime: {0}", tzi.IsDaylightSavingTime(DateTime.Now)).AppendLine()
buf.AppendFormat("Current Local Time: {0}", TimeZoneInfo.ConvertTimeFromUtc(DateTime.UtcNow, tzi)).AppendLine()
buf.AppendFormat("Current UTC Time: {0}", DateTime.UtcNow).AppendLine()
buf.AppendLine()
Next
Results:
Eastern Standard Time
SupportsDaylightSavingTime: True
DisplayName: (UTC-05:00) Eastern Time (US & Canada)
StandardName: Eastern Standard Time
DaylightName: Eastern Daylight Time
IsDaylightSavingTime: True
Current Local Time: 4/26/2012 10:37:08 AM
Current UTC Time: 4/26/2012 2:37:08 PM
US Eastern Standard Time
SupportsDaylightSavingTime: True
DisplayName: (UTC-05:00) Indiana (East)
StandardName: US Eastern Standard Time
DaylightName: US Eastern Daylight Time
IsDaylightSavingTime: True
Current Local Time: 4/26/2012 10:37:08 AM
Current UTC Time: 4/26/2012 2:37:08 PM
According to Wikipedia and “What time is it in Indiana”, the whole of Indiana now observes DST – but either in Central or Eastern time.
So there’s no “one time in Indiana”, but it observes daylight savings of some form or other everywhere. If you go back before 2005 (ish – the pages above aren’t terribly clear to me) you may or may not find that the Windows time zone database correctly models history. I’d expect the tzdb database to have fuller information… that has several different Indiana-based time zone IDs (e.g. America/Indiana/Knox, America/Indiana/Petersburg etc)