Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Is DateTime broken on Android?

$
0
0

I have a forms app in which Im trying to use DateTime.UtcNow. I get unexpected results to say the least.

The image below shows the side by side simulators both returning a UTC from a call to my mobile service and the others are device specific dates from my PCL. You can see that the iOS version properly shows the dates but the android side, while it shows the proper timezone, shows Local time when calling any of the Utc functions. It also oddly calculates the Now date backwards it seems, or maybe the calculation starts with the incorrect Utc so it results in my local time -5.

Am I missing something or is this broken?

image

Thanks.


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>