[Mono-list] Bug in DateTime Parsing

Kevin Berry kevinbe71mono@yahoo.com
Fri, 21 May 2004 23:42:56 -0700 (PDT)


Hi,

Found another discrepancy between .NET and mono...

The code below produces different results under
Windows XP with .NET vs Linux with Mono.  Is this
intended?  Note: The hours are out by the time zone
adjustment.  So it's like Mono assumes the time is GMT
while .NET assumes the time is relative to the
system's time zone.  Is there anyway to work around
this easily?

<%@ Page Language="C#" %>
<html>
<body>
Expecting hour to be 19...  It's actually...
<%
  DateTime date = DateTime.Parse("2002-12-16
19:20:00");
%>
<%= date.Hour %>
</body>
</html>

Thanks,
Kevin.



	
		
__________________________________
Do you Yahoo!?
Yahoo! Domains  Claim yours for only $14.70/year
http://smallbusiness.promotions.yahoo.com/offer