however, when I retrieve the date, it doesn't convert correctly:
I have the data defined in the model as so currently
[FirestoreProperty("CreatedDate")]
public DateTime CreatedDate { get; set; }
If I were to change the type to DateTimeOffset then it would retrieve the date, but it's not the local time that I saved (it's about 5 hours ahead).
[FirestoreProperty("CreatedDate")]
public DateTimeOffset CreatedDate { get; set; }
Is this a bug that the DateTime type doesn't work properly?
Reading a server timestamp into a model property with the DateTime type just isn't currently supported. Not that it couldn't be--the code just hasn't been written for it.
I can save dates into a Firestore doc just fine
however, when I retrieve the date, it doesn't convert correctly:
I have the data defined in the model as so currently [FirestoreProperty("CreatedDate")] public DateTime CreatedDate { get; set; }
If I were to change the type to DateTimeOffset then it would retrieve the date, but it's not the local time that I saved (it's about 5 hours ahead). [FirestoreProperty("CreatedDate")] public DateTimeOffset CreatedDate { get; set; }
Is this a bug that the DateTime type doesn't work properly?