Repository navigation
Changes to DateTime mapping - #1940
Merged
Merged
Conversation
Member
Author
|
Hey @YohDeadfall, can you please give this a thorough review to make sure everything makes sense? |
Contributor
|
Sure, will do it tomorrow. |
1. Datetime is *always* sent as timestamp by default, regardless of its kind. You can still specify `NpgsqlDbType.TimestampTz`, in which case local `DateTime` gets converted to UTC before sending. 2. When reading timestamptz as a DateTimeOffset, the machine local offset will be used. Previously a DateTimeOffset in UTC was returned. 3. It is no longer possible to read or write DateTimeOffset as timestamp, only as timestamptz.
YohDeadfall
approved these changes
May 20, 2018
YohDeadfall
left a comment
Contributor
There was a problem hiding this comment.
Looks good to me. Thanks!
|
|
||
| ## Breaking changes from 3.2 | ||
|
|
||
| > [!CAUTION] |
Contributor
There was a problem hiding this comment.
nit: I think that it would be better to make it bold and add two spaces after for a line break.
Member
Author
There was a problem hiding this comment.
Have you seen what the red caution box looks like in the rendered site? It looks quite "bold" already I think...
Contributor
There was a problem hiding this comment.
Red box? Is it visible only on the site?
Member
Author
There was a problem hiding this comment.
Yes. This is a special syntax for docfx (our documentaton generation system) which generates a red box like you can see on the current release notes.
| > 2. When reading `timestamptz` as a `DateTimeOffset`, the machine local offset will be used. Previously a `DateTimeOffset` in UTC was returned. | ||
| > 2. It is no longer possible to read or write `DateTimeOffset` as `timestamp`, only as `timestamptz`. | ||
|
|
||
| > [!CAUTION] |
This was referenced May 20, 2018
Closed
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.
DateTime is always sent as timestamp by default, regardless of its kind. You can still specify
NpgsqlDbType.TimestampTz, in which case localDateTimegets converted to UTC before sending.When reading timestamptz as a DateTimeOffset, the machine local offset will be used. Previously a DateTimeOffset in UTC was returned.
It is no longer possible to read or write DateTimeOffset as timestamp, only as timestamptz.