f-miyu / Plugin.CloudFirestore

MIT License
121 stars 44 forks source link

DateTime hour... #52

Closed angelru closed 3 years ago

angelru commented 3 years ago

I am saving a date, in the database I see the time well, but when I receive the object, the time always arrives 2 hours less, why?

the date and time is saved as UTC+2 in firebase with DateTime.Now

f-miyu commented 3 years ago

This library converts a time received from database to UTC time. If you want to get the local time, you should use ToLocalTime() method of DateTime class.

angelru commented 3 years ago

@f-miyu thanks