You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I have a model with a DateTimeOffset property that I store on redis. When I insert a new entry using InsertAsync the DateTimeOffset property has the correct offset but after calling SaveAsync the offset changes. It looks like it changes to the local timezone offset of the machine where redis-server is running.
Yeah, it looks like it's regionally adjusting the offset to the TZ based on where Redis OM is running. Trying to think why this would be 🤔 - basically Redis OM takes a snapshot of what your object looks like when it's enumerated (e.g. where you do the FindById) and when you save it, it checks the current state against that snapshot when making its decision about whether or not to commit an update, I guess in this case it must be serializing the new offset to the localized timezone.
Hello, I have a model with a
DateTimeOffset
property that I store on redis. When I insert a new entry usingInsertAsync
theDateTimeOffset
property has the correct offset but after callingSaveAsync
the offset changes. It looks like it changes to the local timezone offset of the machine where redis-server is running.Demo to reproduce: https://github.com/Jimmys20/RedisOMDateTimeOffset
After InsertAsync:
After SaveAsync:
I know that I don't have to call SaveAsync after InsertAsync, this is just a minimal example to reproduce the problem.
The text was updated successfully, but these errors were encountered: