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


           Summary: DateTime is not able to parse german dates
           Product: Mono: Class Libraries
           Version: 1.2.6
          Platform: i686
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: System
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]
         QAContact: [email protected]
          Found By: ---


Hi,

DateTime.Parse is not able to parse a date in the format:
"22.01.2008 00:10:05", where it's the 22nd of February in 2008, 10 minutes and
5 seconds past midnight.

The following snippet throws a System.FormatException (see below). MS VS 2003
compiles and runs it without problems.

using System;

namespace test
{
        class MainClass
        {
                public static void Main(string[] args)
                {
                        //date is 22nd of Januarry in 2008
                        //time is 10 minutes and 5 seconds past midnight
                        DateTime foo=new DateTime();
                        foo=DateTime.Parse("22.01.2008 00:10:05");
                }
        }
}

Unhandled Exception: System.FormatException: String was not recognized as a
valid DateTime.
  at System.DateTime.Parse (System.String s, IFormatProvider fp, DateTimeStyles
styles) [0x00000] 
  at System.DateTime.Parse (System.String s, IFormatProvider fp) [0x00000] 
  at System.DateTime.Parse (System.String s) [0x00000] 
  at test.MainClass.Main (System.String[] args) [0x00008] in
/home/mono/coding/mono/test/test/Main.cs:24 


bg Roland


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