Bug 45192 - ToLocalTime - Forms/Android Incorrect
Summary: ToLocalTime - Forms/Android Incorrect
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.3.2
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2016-10-07 16:29 UTC by Andrew
Modified: 2016-10-11 14:55 UTC (History)
4 users (show)

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 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 Andrew 2016-10-07 16:29:53 UTC
Forms, Android

ToLocalTime does not convert a Datetime (kind UTC) to the local timezone on the device.


EDT 10/7/2017 9:00AM Kind UTC
call ToLocalTime() gets converted to 10/7/2016 4:00AM Local Time.  The timezone on the device is CDT.  
This is incorrect, should be +5 10/7/2016 1:00PM.

iOS works as expected.  Forms/Android or Android fails.
Comment 1 adrianknight89 2016-10-10 19:23:49 UTC

shows 4 AM is the correct time for CDT.

I recently worked on https://github.com/xamarin/Xamarin.Forms/pull/423 to clear out caches in case you change timezones. (Not saying if this would fix anything for you.)

Strangely, Android shows 8 PM for me. Not sure what's going on.
Comment 2 Andrew 2016-10-11 13:55:17 UTC
You can close this.  I did get it working, but seems to be different behavior on iOS and Android.  close this bug.  Thanks for fixing all the other bugs.
Comment 3 adrianknight89 2016-10-11 14:03:59 UTC
Unlike XF team, I don't have the authority to close bugs I don't own. Can you do it? Thanks.
Comment 4 Andrew 2016-10-11 14:12:14 UTC
I can not.  :( need someone from XF team
Comment 5 adrianknight89 2016-10-11 14:25:16 UTC
If you scroll up, it says "Status: NEW". There is an "edit" button next to it.
Comment 6 Andrew 2016-10-11 14:42:07 UTC
My Status are:  New, Confirmed, Assigned, In_Progress, NeedsInfo, Resolved.  

Maybe make a bug to add a closed status?
Comment 7 adrianknight89 2016-10-11 14:52:39 UTC
Set it to Resolved -> Invalid.