jamesmontemagno / SettingsPlugin

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

DateTime property Always fallback to UTC #29

Closed xalikoutis closed 8 years ago

xalikoutis commented 8 years ago

Bug

Version Number of Plugin: 2.5.1 Device Tested On: Samsung Tab S2

If i create a property with type DateTime Always fallback to UTC even if it has a default value like this

 private const string ExpireTokenDateKey = "expiretokendate_key";
private static readonly DateTime ExpireTokenDateDefault = new DateTime(1980,10,19,12,12,12, DateTimeKind.Local);

Then if i do Settings.ExpireTokenDate = DateTime.Now.AddSeconds(_authenticationResult.ExpiresIn); Settings.ExpireTokenDate is in UTC

jamesmontemagno commented 8 years ago

Ate times are always stored in UTC. This is as designed.