Currently, getLocalTZA() does the following: -- r = GetTimeZoneInformation(&tzi); switch (r) { case TIME_ZONE_ID_STANDARD: case TIME_ZONE_ID_DAYLIGHT: case TIME_ZONE_ID_UNKNOWN: t = -(tzi.Bias + tzi.StandardBias) * cast(d_time)(60 * TicksPerSecond); break; default: t = 0; break; } return t; -- As can be seen, it always uses the StandardBias field, as long as GetTimeZoneInformation doesn't result in an error. However, this is incorrect. When TIME_ZONE_ID_DAYLIGHT is returned, the DaylightBias field should be used, as this indicates that the system is currently using Daylight Savings Time. StandardBias is meant to be used only when the system is not in DST, as documented at http://msdn.microsoft.com/library/en-us/sysinfo/base/gettimezoneinformation.asp and http://msdn2.microsoft.com/en-us/library/ms725481.aspx One possible working version follows: -- r = GetTimeZoneInformation(&tzi); switch (r) { case TIME_ZONE_ID_STANDARD: t = tzi.Bias + tzi.StandardBias; break; case TIME_ZONE_ID_DAYLIGHT: t = tzi.Bias + tzi.DaylightBias; break; case TIME_ZONE_ID_UNKNOWN: t = tzi.Bias; break; default: t = 0; break; } return -t * cast(d_time)(60 * TicksPerSecond);
Fixed dmd 1.021 and 2.004
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル