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
DateTimeOffset is stored as UTC ticks. The consequence is that the data read back lacks the time zone offset; however, it still accurately represents the correct moment in time.
Store this: "2014-06-11T20: 24: 01.8325787-07: 00"
You read back: "2014-06-12T03: 24: 01.8325787+00: 00"
They represent the same moment in time, but the first contained a timezone offset.
A work around is to store a DateTimeOffset's 'Offset' and 'Ticks' separately and rebuild an accurate DateTimeOffset on read. This does mean range queries are more difficult.
The text was updated successfully, but these errors were encountered:
Yeah I just noticed this myself, sorry for the trouble.
My thoughts are to store the offset in an auxiliary column and keep the UTC date time in the main column. This should allow compares to keep working and will only fail if people write their own queries.
DateTimeOffset is stored as UTC ticks. The consequence is that the data read back lacks the time zone offset; however, it still accurately represents the correct moment in time.
Store this: "2014-06-11T20: 24: 01.8325787-07: 00"
You read back: "2014-06-12T03: 24: 01.8325787+00: 00"
They represent the same moment in time, but the first contained a timezone offset.
A work around is to store a DateTimeOffset's 'Offset' and 'Ticks' separately and rebuild an accurate DateTimeOffset on read. This does mean range queries are more difficult.
The text was updated successfully, but these errors were encountered: