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
{{ message }}
Repository navigation
DateTime paramter with UTC value is converted to Local datetime #2881
Checked the example, but wasn't able to reproduce the issue. The returned value was the same as I passed as a parameter. Please check that you're not using timestamptz anywhere.
Activity
YohDeadfall commentedon Mar 2, 2020
Duplicate of #2209.
The driver send any
DateTimeastimestampandDateTimeOffsetastimestamptz. This was done to avoid another confusion with local time conversion.If you have a
timestamptzcolumn use the corresponding CLR type to avoid server side conversion.sandeepc24 commentedon Mar 2, 2020
If you look at the sample I attached the table is defined as
and the code inserting record is
this should work as per your explanation. I don't see why it doesn't.
My postgres timezone is
Pacific/Auckland, is this causing the conversion?YohDeadfall commentedon Mar 2, 2020
Okay, will take a deeper look later today.
YohDeadfall commentedon Mar 3, 2020
Checked the example, but wasn't able to reproduce the issue. The returned value was the same as I passed as a parameter. Please check that you're not using
timestamptzanywhere.sandeepc24 commentedon Mar 4, 2020
@YohDeadfall - I have double checked, I am not using timestamptz anywhere.
sandeepc24 commentedon Mar 4, 2020
But, after changing my postgres timezone to UTC the test app works as expected.
YohDeadfall commentedon Mar 5, 2020
Sounds strange since PostgreSQL converts
timestamp with time zoneonly. How are you checking which value is stored in the database?sandeepc24 commentedon Mar 5, 2020
Using PGAdmin 3