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

Timezone not found on deserializing json datetime

$
0
0

I believe this is already a known bug.
Android
Compile: 4.0.3
Minimum: 4.0.3
Target: 4.4

When I try to deserialize a json that contains a datetime I get a timezone not found.
If I manually set the timezone on Android device on Controls -> Date & time it works.
But this is not acceptable, the users shouldn't need set the timezone to make the app work.
Further more this happens right on my app startup so they never even see the app running the first screen.

I've tried to run this code on android

            if (TimeZone.CurrentTimeZone == null)
            {
                AlarmManager alarm = (AlarmManager)GetSystemService(Context.AlarmService);
                alarm.SetTimeZone("UTC");
            }

but it never goes inside the condition because the timezone is always set.

So is there any workaround, like forcing a default timezone if none is set on forms?


Viewing all articles
Browse latest Browse all 58056

Trending Articles



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