[Mono-bugs] [Bug 403409] New: DateTimeOffset.ParseExact cannot deal with certain inputs

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue Jun 24 15:49:58 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=403409


           Summary: DateTimeOffset.ParseExact cannot deal with certain
                    inputs
           Product: Mono: Class Libraries
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: System
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: geza at mailinator.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


In microsoft .net 3.5, the following works:

DateTimeOffset.ParseExact("20080616_0126_-0900", "yyyyMMdd_HHmm_zzz",
CultureInfo.InvariantCulture).ToString()
"2008-06-16 1:26:00 -09:00"


In Mono, this fails with FormatException.  Apparently, the code assumes that
there's some separator/whitespace after the year, as it tries to parse 5 digits
even if the format specifier is yyyy.  Also, it wants a ':' between the hour
and minute portion of the offset.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list