Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
DateTimeOffset does not correctly handle RFC1123 formatted timestamps as in the following example:
var t = DateTimeOffset.Parse("Wed, 10 Sep 2014 22:01:40 GMT");
var t1 = t.ToString();
var t2 = t.ToString("r");
On Mono we see:
t1 = "9/10/2014 10:01:40 PM +02:00"
t2 = "Wed, 10 Sep 2014 20:01:40 GMT"
.NET 4.5 shows:
t1 = "9/10/2014 10:01:40 PM +00:00"
t2 = "Wed, 10 Sep 2014 22:01:40 GMT"
In both examples t2 should exactly match the original RFC1123 timestamp, however in Mono time has been shifted by two hours (the UTC offset of the machine where the test ran).
On a machine running in EDT:
t1 = "9/10/2014 10:01:40 PM -04:00"
t2 = "Thu, 11 Sep 2014 02:01:40 GMT"
And now we are out by 4 hours.
Thank you for the detailed bug report.
The pull request for this issue can be found in the link below.
Fixed in master 0083728e199bfa37fc9867654d3571b9a0b1df09.