Bug 60036 - Date.Time parse issue (year 1948)
Summary: Date.Time parse issue (year 1948)
Alias: None
Product: iOS
Classification: Xamarin
Component: BCL Class Libraries (show other bugs)
Version: XI 10.3 (iOS 10.2)
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2017-10-07 14:25 UTC by Alessandro Facchini
Modified: 2017-10-09 14:28 UTC (History)
2 users (show)

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


Description Alessandro Facchini 2017-10-07 14:25:32 UTC
hi i've been experiencing this issue on both iOS and Android.

this line of code
	var d = DateTime.ParseExact("1948-02-19T08:00:00+02:00", "yyyy-MM-ddTHH:mm:sszzz", null); //KO

return an error: year, Month, and Day parameters describe an un-representable DateTime.

But this error it's returned only for the year 1948, for any other year it works correctly:
the below line infact, works fine
var d1 = DateTime.ParseExact("1949-02-19T08:00:00+02:00", "yyyy-MM-ddTHH:mm:sszzz", null); //OK

I've spent a lot of time to figure out that the problem was like this because i received the same error in my soap based web services. Once investigated i determined that the error was raised only for the year 1948

To reproduce the issue it's enough you run the line of code above


alessandro Facchini
Comment 1 Marek Safar 2017-10-09 13:55:01 UTC
What CultureInfo.CurrentCulture this is on ? I can reproduce it only with `ar-SA`
Comment 2 Alessandro Facchini 2017-10-09 14:28:08 UTC

my culture is "IT-it", but i've seen the same behaviour in "en-US".

my environment is the one specified below:

Xamarin Studio Community
Version 6.3 (build 864)
.net runtime Mono 4.8.0 (i tried also older ones and newer ones)

Version: (Xamarin Studio Community)

Version: (Xamarin Studio Community)

Operating System
Mac OS X 10.12.6

As addition information it seems that in iOS the issue is either on the emulators or on the real devices, whereas on android the issue arises only on real devices

Please le me know for any further question

Best regards

alessandro facchini

Note You need to log in before you can comment on or make changes to this bug.