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


           Summary: TypeConverter.ConvertToInvariantString(DateTime) gives
                    invalid month
           Product: Mono: Class Libraries
           Version: SVN
          Platform: x86
        OS/Version: openSUSE 10.3
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: System
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]
         QAContact: [email protected]
          Found By: Other


Using the following works in Windows, but provides invalid month (00) on Linux
on second Console.WriteLine (any DateTime with 00:00:00 time portion outputs
invalid month).  Note: Compiled on Win32, .net 2.


DateTime now = DateTime.Now;
DateTime today  = DateTime.Today;

TypeConverter c = TypeDescriptor.GetConverter(now.GetType());

Console.WriteLine(c.ConvertToInvariantString(now));
// Correct output both Win&Linux of 06/03/2008 10:42:20

Console.WriteLine(c.ConvertToInvariantString(today));
// On Window outputs 2008-06-03
// On Linux outputs 2008-00-03


-- 
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.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to