Support for DateTimeOffset#239
Merged
Merged
Conversation
Owner
|
Love this as it makes the DateTime storage debacle go away. :-) |
|
would it be fair to say that any datetimes stored are TZ agnostic, therefore if your policy is to make sure all datetimes that are stored are UTC, then set the DateTimeKind upon retrieval from the sqlite db? |
github-actions Bot
pushed a commit
to Reddevildragg-UPM-Forks/sqlite-net
that referenced
this pull request
Nov 17, 2020
Support for DateTimeOffset
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As mentioned in #217
Saving a DateTime is probably not what people want in most cases.
DateTime represents the same date and time agnostic to the timezone, such as if you wanted to describe "the start time of thanks giving dinner" across multiple timezone, or opening hours of shops.
From the article at http://msdn.microsoft.com/en-us/library/bb384267.aspx:
"...
Note
These uses for DateTimeOffset values are much more common than those for DateTime values. As a result, DateTimeOffset should be considered the default date and time type for application development.
..."