Bug 7214 - TimeZoneInfo.ConvertTime doesn't work
Summary: TimeZoneInfo.ConvertTime doesn't work
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: 5.99.x
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Rolf Bjarne Kvinge [MSFT]
Depends on:
Reported: 2012-09-17 07:33 UTC by Rolf Bjarne Kvinge [MSFT]
Modified: 2012-09-19 17:31 UTC (History)
2 users (show)

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

System.Core.zip (210.76 KB, application/zip)
2012-09-17 07:35 UTC, Rolf Bjarne Kvinge [MSFT]

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 Developer Community or GitHub 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:

Description Rolf Bjarne Kvinge [MSFT] 2012-09-17 07:33:07 UTC
Test code:

TimeZoneInfo.ConvertTime (DateTime.Now, TimeZoneInfo.FindSystemTimeZoneById("Pacific/Auckland"));

results in:

System.ArgumentException: Kind propery of dateTime is Local but the sourceTimeZone does not equal TimeZoneInfo.Local
Comment 1 Rolf Bjarne Kvinge [MSFT] 2012-09-17 07:33:48 UTC
Fixed in master: 99ae03a2f7cf904abd29e84890436c70d3f598bd.

Commit to ios6 still pending.
Comment 2 Rolf Bjarne Kvinge [MSFT] 2012-09-17 07:35:38 UTC
Created attachment 2552 [details]

Attaching hotfixed System.Core.dll. Unzip contents of attached file to /Developer/MonoTouch/usr/lib/mono/2.1 to install. Note that any MonoTouch updates will overwrite this hotfix.
Comment 3 Rolf Bjarne Kvinge [MSFT] 2012-09-19 17:31:56 UTC
Fixed in ios6 too: c34878eea6beac298f71bb497067934730e4ccd1.