[Mono-bugs] [Bug 330085] New: DateTime.ToBinary and DateTime. FromBinary not compatible with .Net

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Oct 2 09:02:02 EDT 2007


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

           Summary: DateTime.ToBinary and DateTime.FromBinary not compatible
                    with .Net
           Product: Mono: Class Libraries
           Version: 1.2
          Platform: x86
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: System
        AssignedTo: mono-bugs at ximian.com
        ReportedBy: jonathan.gagnon at croesus.com
         QAContact: mono-bugs at ximian.com
          Found By: ---


Description of Problem:

When using DateTime.ToBinary with a local DateTime (DateTimeKind.Local), mono
doesn't produce the same result as .NET.  .NET converts the ticks in UTC, so
that when calling DateTime.FromBinary, they can convert it back using the local
machine settings and have a DateTime that identifies the same point in time.

Steps to reproduce the problem:
Console.WriteLine(new DateTime(2007, 1, 1, 1, 0, 0,
DateTimeKind.Local).ToBinary());

Actual Results:
-8590339936854775808

Expected Results:
-8590339756854775808

How often does this happen? 
Every time.


-- 
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