jamesmontemagno / SettingsPlugin

Read and Write Settings Plugin for Xamarin and Windows
MIT License
324 stars 80 forks source link

Issue with types Guid and DateTime #79

Closed avinash-ramireddy closed 7 years ago

avinash-ramireddy commented 7 years ago

Hi, I was trying to pass guid using settings.SelectedItemId but it's returning exception

FormatException: Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).

and issue with datetime is that when I set datetime it's subtracting 5.30hrs in settings.SelectedDate contain less time(530hrs) that what is passed.

Update: I just read documentation and found that date part is correct

jamesmontemagno commented 7 years ago

What does your "SelectedItemIndex look like"... what platform?

Here is a template that you deleted... fill it in:

If you are creating an issue for a BUG please fill out this information. If you are asking a question or requesting a feature you can delete the sections below.

Failure to fill out this information will result in this issue being closed. If you post a full stack trace in a bug it will be closed, please post it to http://gist.github.com and then post the link here.

Bug Information

Version Number of Plugin: Device Tested On: Simulator Tested On: Version of VS: Version of Xamarin: Versions of other things you are using:

Steps to reproduce the Behavior

Expected Behavior

Actual Behavior

Code snippet

Screenshots

avinash-ramireddy commented 7 years ago

I was actually working on android at that moment. My SelectedItemId is Guid I will try to create a way to reproduce the issue as it was not happening all the time.

In the mean time,can you help me with the date part. I am setting some date and I want to fetch as it is.How can I do that?

jamesmontemagno commented 7 years ago

It saves all dates as UTC, so you will want to convert it back.

jamesmontemagno commented 7 years ago

Closing out due to UTC documented and lack of info on GUID issue.