Nodatime and Xamarin

19 views
Skip to first unread message

Sean Farrow

unread,
Apr 26, 2020, 3:41:11 PM4/26/20
to noda...@googlegroups.com

Hi all,

 

I’m just about to do some work with Xamarin and need to use Nodatime.

 

I noticed in the following StackOverflow question that there was an issue when determining the time zone with certain versions of nodatime:

https://stackoverflow.com/questions/52608545/how-can-i-get-noda-time-in-xamarin-to-return-america-los-angeles

 

Before I implement my own solution, I was wondering which versions of Nodatime are affected?

Secondly, has the issue referred to in the comment around ordering the possible time zones by ID been completed. Also, are all possible time zones returned or just the first one found. It would be really nice to have all possible zones returned with the confidence score.

 

Any help appreciated.

 

Thanks,

Sean.

Jon Skeet

unread,
Apr 26, 2020, 4:18:45 PM4/26/20
to Noda Time
The code in Noda Time hasn't changed around this for a long time. It's more likely to be affected by different versions of Xamarin. If Xamarin always returns a reasonable time zone ID now, it should be fine. If we have to guess via all the time zones we know about, that could still give the "wrong" answer (if there are multiple answers of equal quality). It returns the zone with the best match - the "guessing" part is entirely encapsulated in the API; we don't give any kind of confidence scores.

The ordering issue was fixed in October 2018: https://github.com/nodatime/nodatime/issues/1207

--

---
You received this message because you are subscribed to the Google Groups "Noda Time" group.
To unsubscribe from this group and stop receiving emails from it, send an email to noda-time+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/noda-time/DB7PR05MB5659FCB537F02587B9F1DEFBC6AE0%40DB7PR05MB5659.eurprd05.prod.outlook.com.
Reply all
Reply to author
Forward
0 new messages