[Mono-bugs] [Bug 324044] DateTime XML serialization 'incompatible' with MS

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Nov 2 13:20:17 EDT 2007


https://bugzilla.novell.com/show_bug.cgi?id=324044#c2


Atsushi Enomoto <atsushi at ximian.com> changed:

           What    |Removed                                         |Added
----------------------------------------------------------------------------
                 CC|                                                |atsushi at ximian.com
             Status|NEW                                             |RESOLVED
         Resolution|                                                |INVALID




--- Comment #2 from Atsushi Enomoto <atsushi at ximian.com>  2007-11-02 11:20:17 MST ---
You are likely using comparing results in different profiles i.e. .NET 2.0
result vs. Mono result for 1.1 profile. They are different between .NET 1.1 and
NET 2.0.

atsushi at PC ~/tests/xml/serialization
$ cat 324044.cs
using System;
using System.Xml.Serialization;
using System.IO;

public class Test {
    public static void Main () {
        XmlSerializer xs = new XmlSerializer (typeof(DateTime));
        StringWriter sw = new StringWriter ();
        DateTime dt = new DateTime (2007,4,12,14,30,39,117)
                .AddTicks (5030).ToLocalTime ();
        xs.Serialize (sw, dt);
        Console.WriteLine (sw.ToString ());
    }
}


atsushi at PC ~/tests/xml/serialization
$ mcs 324044.cs

atsushi at PC ~/tests/xml/serialization
$ ./324044.exe
<?xml version="1.0" encoding="utf-16"?>
<dateTime>2007-04-12T23:30:39.1175030+09:00</dateTime>

atsushi at PC ~/tests/xml/serialization
$ mono 324044.exe
<?xml version="1.0" encoding="utf-16"?>
<dateTime>2007-04-12T23:30:39.1175030+09:00</dateTime>

atsushi at PC ~/tests/xml/serialization
$ gmcs 324044.cs

atsushi at PC ~/tests/xml/serialization
$ ./324044.exe
<?xml version="1.0" encoding="utf-16"?>
<dateTime>2007-04-12T23:30:39.117503+09:00</dateTime>

atsushi at PC ~/tests/xml/serialization
$ mono 324044.exe
<?xml version="1.0" encoding="utf-16"?>
<dateTime>2007-04-12T23:30:39.117503+09:00</dateTime>


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