[Mono-bugs] [Bug 75340][Nor] New - Fail to read formatted TimeSpan values

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Jun 21 09:46:50 EDT 2005


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 roeie at mainsoft.com.

http://bugzilla.ximian.com/show_bug.cgi?id=75340

--- shadow/75340	2005-06-21 09:46:50.000000000 -0400
+++ shadow/75340.tmp.744	2005-06-21 09:46:50.000000000 -0400
@@ -0,0 +1,58 @@
+Bug#: 75340
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: CORLIB
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: roeie at mainsoft.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Fail to read formatted TimeSpan values
+
+Description of Problem:
+When serializing an object that has a data member of type 'TimeSpan'
+The TimeSpan is serialized using the utility class 'SoapDuration' with 
+the function: 'public static string ToString (TimeSpan value)'.
+when trying to deserialize the object, the process failes.
+The failure occures at the same utility class on the function:
+'public static TimeSpan Parse (string s)'.
+The format of the String is as follows:
+         P<year>Y<months>M<days>DT<hours>H<minutes>M<seconds>S
+where the seconds value can be a NON integer number.
+for example when constructing a TimeSpan object as follows:
+     TimeSpan t = new TimeSpan(100000);
+the formatted string should be: P0Y0M0DT0H0M0.0100000S
+because 100000 nano seconds are 0.01 seconds
+
+The problem, as i see it, is that the parse function doesn't cope with 
+a non integer value, and finishes with errors.
+
+Steps to reproduce the problem:
+1. build a DayLightInfo object
+     //This object has a data member of type TimeSpan
+     DaylightTime time = new DaylightTime(new DateTime(2000,1,1), 
+                         new DateTime(2000,1,10),           
+                         new TimeSpan(100000));
+2. serialize this object using soap
+3. deserialize this object using soap.
+
+Actual Results:
+      
+   serialization fails
+
+Expected Results:
+  
+   serialization should succeed
+
+How often does this happen? 
+  
+   every time
+
+Additional Information:


More information about the mono-bugs mailing list