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 [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=77252 --- shadow/77252 2006-01-13 20:40:08.000000000 -0500 +++ shadow/77252.tmp.30009 2006-01-13 20:40:08.000000000 -0500 @@ -0,0 +1,66 @@ +Bug#: 77252 +Product: Mono: Class Libraries +Version: unspecified +OS: GNU/Linux [Other] +OS Details: Fedora Core 4 +Status: NEW +Resolution: +Severity: +Priority: Normal +Component: Sys.XML +AssignedTo: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +TargetMilestone: --- +URL: +Cc: +Summary: XmlConvert.ToString( TimeSpan t ) ignores the TimeSpan Tick value + +Please fill in this template when reporting a bug, unless you know what +you are doing. +Description of Problem: +XmlConvert.ToString( TimeSpan t ) ignores the TimeSpan Tick value + +Steps to reproduce the problem: +1. +using System; +using System.Collections.Generic; +using System.Text; +using System.Xml; + +namespace XmlConvertBug +{ + class Program + { + /// <summary> + /// Mono XmlConvert.ToString() ignores TimeSpan ticks + /// </summary> + /// <param name="args"></param> + static void Main(string[] args) + { + TimeSpan t1 = TimeSpan.FromTicks( TimeSpan.TicksPerSecond + +1 ); + string s = XmlConvert.ToString(t1); + TimeSpan t2 = XmlConvert.ToTimeSpan(s); + if( t1.Equals(t2) ) + Console.WriteLine( "XmlConvert.ToString(TimeSpan.FromTicks +(1)) works properly" ); + else + Console.WriteLine("XmlConvert.ToString(TimeSpan.FromTicks +(1)) has a bug"); + } + } +} + +Actual Results: +XmlConvert.ToString(TimeSpan.FromTicks(1)) has a bug + +Expected Results: +XmlConvert.ToString(TimeSpan.FromTicks(1)) works properly + +How often does this happen? +Always + +Additional Information: +Inspection of string s = XmlConvert.ToString(TimeSpan.FromTicks(1)) shows +the bug clearly. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
