[Mono-bugs] [Bug 355143] New: DateTime is not able to parse german dates

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Jan 21 13:05:02 EST 2008


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: mono-bugs at lists.ximian.com
        ReportedBy: lordmdma at hotmail.com
         QAContact: mono-bugs at lists.ximian.com
          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.


More information about the mono-bugs mailing list