[Mono-bugs] [Bug 376929] DateTime.ParseExact adds day when parsing minvalue

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Apr 4 03:12:07 EDT 2008


User gert.driesen at pandora.be added comment

--- Comment #1 from Gert Driesen <gert.driesen at pandora.be>  2008-04-04 01:12:06 MST ---
The problem appears to be that I'm at a positive UTC offset (GMT+1).

DateTime.MinValue with the specified format results in the following string:

In DateTime._DoParse, we substract the UTC offset from the date to get the UTC
time. This results in a negative tick count, which we "correct" by adding the
tickcount for a day (??).

At this point, we have the following UTC time:


Finally, we change it into local time and this gets us:


which is of course wrong!

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