[Mono-dev] DateTime.Parse difference with .NET

Martin Hinks mhinks at gmail.com
Mon Aug 8 13:26:15 EDT 2005


using System;

namespace DateFail
{
	class MainClass
	{
		public static void Main(string[] args)
		{
			DateTime.Parse("17/07/2005 00:00:00");
		}
	}
}

.NET Framework 1.1 result: Success
Mono 1.1.8 result: 

Unhandled Exception: System.FormatException: String was not recognized as 
a vali
d DateTime.
in <0x000e5> System.DateTime:Parse (System.String s, IFormatProvider fp, 
DateTim
eStyles styles)
in <0x00016> System.DateTime:Parse (System.String s, IFormatProvider fp)
in <0x00013> System.DateTime:Parse (System.String s)
in <0x00013> DateFail.MainClass:Main (System.String[] args)

I submitted it to BugZilla - just wanted to make sure I'm not doing
anything stupid and also wondered if someone had a workaround?
 
Martin Hinks
http://www.m-s-d.net



More information about the Mono-devel-list mailing list