S
Scott
Hi All,
Currently I am writting an application around safe travel, as part of
the system I need to store timezone information and also specific time
zone dates.
So, I use
TIME_ZONE_INFORMATION tziNative;
TimeZoneInformation[] zones = EnumZones();
NativeMethods.GetTimeZoneInformation(out tziNative);
// Getting the identity is tricky; the best we can do
// is a match on the properties.
for (int idx = 0; idx < zones.Length; ++idx)
{
if (zones[idx].m_tzi.bias == tziNative.Bias &&
zones[idx].m_tzi.daylightBias ==
tziNative.DaylightBias &&
zones[idx].m_tzi.standardBias ==
tziNative.StandardBias &&
zones[idx].m_standardName ==
tziNative.StandardName &&
zones[idx].m_daylightName ==
tziNative.DaylightName)
{
return zones[idx];
}
}
To get the time zone, and in the database I am storing the index to
the time zones.
Are these timezones ever added to, or removed?
Whats the best way to reference a timezone ?
Thanks
Scott
Currently I am writting an application around safe travel, as part of
the system I need to store timezone information and also specific time
zone dates.
So, I use
TIME_ZONE_INFORMATION tziNative;
TimeZoneInformation[] zones = EnumZones();
NativeMethods.GetTimeZoneInformation(out tziNative);
// Getting the identity is tricky; the best we can do
// is a match on the properties.
for (int idx = 0; idx < zones.Length; ++idx)
{
if (zones[idx].m_tzi.bias == tziNative.Bias &&
zones[idx].m_tzi.daylightBias ==
tziNative.DaylightBias &&
zones[idx].m_tzi.standardBias ==
tziNative.StandardBias &&
zones[idx].m_standardName ==
tziNative.StandardName &&
zones[idx].m_daylightName ==
tziNative.DaylightName)
{
return zones[idx];
}
}
To get the time zone, and in the database I am storing the index to
the time zones.
Are these timezones ever added to, or removed?
Whats the best way to reference a timezone ?
Thanks
Scott