X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2Fcorlib%2FSystem%2FTimeZoneInfo.cs;h=0c17412242c835af7107d559a158ce9be1e25444;hb=a27db5252facf504e7995e6abe41ab5f1d3ec506;hp=a61f048476015f52cae0657687f4ca9eb62f3d6f;hpb=11dd7619659f5dfdb8b94d6cde50cf8f078d7476;p=mono.git diff --git a/mcs/class/corlib/System/TimeZoneInfo.cs b/mcs/class/corlib/System/TimeZoneInfo.cs index a61f0484760..0c17412242c 100644 --- a/mcs/class/corlib/System/TimeZoneInfo.cs +++ b/mcs/class/corlib/System/TimeZoneInfo.cs @@ -1295,8 +1295,12 @@ namespace System } else { if (daylightDisplayName != ttype.Name) daylightDisplayName = ttype.Name; - if (dstDelta.TotalSeconds != ttype.Offset - baseUtcOffset.TotalSeconds) - dstDelta = new TimeSpan(0, 0, ttype.Offset) - baseUtcOffset; + if (dstDelta.TotalSeconds != ttype.Offset - baseUtcOffset.TotalSeconds) { + // Round to nearest minute, since it's not possible to create an adjustment rule + // with sub-minute precision ("The TimeSpan parameter cannot be specified more precisely than whole minutes.") + // This happens with Europe/Dublin, which had an offset of 34 minutes and 39 seconds in 1916. + dstDelta = new TimeSpan (0, 0, ttype.Offset - ttype.Offset % 60) - baseUtcOffset; + } dst_start = ttime; dst_observed = true;