[Mono-bugs] [Bug 710512] New: TimeZone.GetUtcOffset returns incorrect result for a DateTime in UTC

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Aug 4 17:42:33 EDT 2011


https://bugzilla.novell.com/show_bug.cgi?id=710512

https://bugzilla.novell.com/show_bug.cgi?id=710512#c0


           Summary: TimeZone.GetUtcOffset returns incorrect result for a
                    DateTime in UTC
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.10.x
          Platform: x86
        OS/Version: Windows XP
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: CORLIB
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: joe at mistachkin.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.19)
Gecko/20110707 Firefox/3.6.19 ( .NET CLR 3.5.30729; .NET4.0E)

Compile and run the following C# code:

using System;

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("{0}",
                TimeZone.CurrentTimeZone.GetUtcOffset(
                    new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc)));
        }
    }
}


Reproducible: Always

Steps to Reproduce:
1. Compile and run the above code.
2. Observe the results, which are different on .NET and Mono.

Actual Results:  
-08:00:00

Expected Results:  
00:00:00

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list