Bug 57741 - Phone abroad rendering home time for DateTimeOffset.LocalDateTime
Summary: Phone abroad rendering home time for DateTimeOffset.LocalDateTime
Status: RESOLVED INVALID
Alias: None
Product: Forms
Classification: Xamarin
Component: Android ()
Version: 2.3.4
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-06-24 13:20 UTC by Philipp Sumi
Modified: 2017-06-28 20:16 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 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:
Status:
RESOLVED INVALID

Description Philipp Sumi 2017-06-24 13:20:39 UTC
Hi all

I have a slightly weird one: I just noticed that on a friend's phone who comes from Turkey, my app renders timestamps in Turkish time rather then the local one.

So basically:

- His phone shows 14:45 as the time since he's here in Switzerland
- In Turkey, it is 15:45
- My app shows 15:45. This is a DateTimeOffset cast to DateTime using LocalDateTime


I'm not a 100% sure this is a bug, but it's definitely not the behavior I would be expecting...


Model:
public DateTimeOffset Timestamp { get; set; }


Formatting:
var timestamp = Model.Timestamp.LocalDateTime;
return timestamp.ToString("HH:mm");
Comment 1 adrianknight89 2017-06-24 15:43:14 UTC
What version of Android is he using? Did he turn on automatic date and time adjustment on his phone? (Compare his Android time to your app's time).
Comment 2 Philipp Sumi 2017-06-26 12:57:27 UTC
Adrian,

He already returned to Turkey, so that diagnosis is gone :). If by "Android time" you mean the time his phone showed: The phone adjusted the time, but was aware it's in another time zone than usual. (I think mine just displays two times in those cases - the one at home and the one of the country I'm at.)
Comment 3 Jason Smith [MSFT] 2017-06-28 20:16:10 UTC
This is not a forms related issue, or really a bug.