Bug 22558 - DateTimeOffset.Parse can't handle the dateTime string without time part.
Summary: DateTimeOffset.Parse can't handle the dateTime string without time part.
Status: RESOLVED FIXED
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Core ()
Version: 3.6.0
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: marcos.henrich
URL:
Depends on:
Blocks:
 
Reported: 2014-09-02 04:23 UTC by Matt Guo
Modified: 2014-09-10 12:47 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Matt Guo 2014-09-02 04:23:27 UTC
var dt = DateTimeOffset.Parse("2013-11-07+11:00", System.Globalization.CultureInfo.InvariantCulture);

dt = {11/7/2013 12:00:00 AM +11:00} with Windows.Net

While Mono will throw a FormatException.
Comment 1 marcos.henrich 2014-09-09 07:59:05 UTC
Hi Matt,

Thank you for the detailed bug report.

The pull request for this issue can be found in the link below.
https://github.com/mono/mono/pull/1266
Comment 2 marcos.henrich 2014-09-10 12:47:35 UTC
Fixed in master ccbd0b1a0d36f4b1d0f5d413eca791e589277de1.
https://github.com/mono/mono/commit/ccbd0b1a0d36f4b1d0f5d413eca791e589277de1