[Mono-bugs] [Bug 58938][Nor] New - DateTime Parsing Assumes GMT

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Mon, 24 May 2004 11:11:20 -0400 (EDT)

Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by kevinbe71mono@yahoo.com.


--- shadow/58938	2004-05-24 11:11:20.000000000 -0400
+++ shadow/58938.tmp.6542	2004-05-24 11:11:20.000000000 -0400
@@ -0,0 +1,56 @@
+Bug#: 58938
+Product: Mono: Class Libraries
+Version: unspecified
+OS Details: RedHat 9.0
+Status: NEW   
+Priority: Normal
+Component: System
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: kevinbe71mono@yahoo.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+Summary: DateTime Parsing Assumes GMT
+Please fill in this template when reporting a bug, unless you know what you
+are doing.
+Description of Problem:
+I've 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.  I haven't found a
+workaround so I wrote my own DateTime parsing code in the meantime.
+Steps to reproduce the problem:
+1. Set time zone to be USA, CST (e.g. Chicago).
+2. Write a small sample ASPX page (e.g. datetimebug.aspx):
+<%@ Page Language="C#" %>
+Expecting hour to be 19...  It's actually...
+  DateTime date = DateTime.Parse("2002-12-16
+<%= date.Hour %>
+Actual Results:
+Expecting hour to be 19...  It's actually... 13.
+Expected Results:
+Expecting hour to be 19...  It's actually... 19.
+How often does this happen? 
+Every time.
+Additional Information: