vscode-postgres icon indicating copy to clipboard operation
vscode-postgres copied to clipboard

Timestamp without timezone displays as local time zone

Open a082651 opened this issue 5 years ago • 1 comments

Reproduction Steps

  1. Create a table with a "timestamp without time zone" column
  2. insert into test_times(timestamp_without_tz) values(timestamp '2019-08-01 19:51:12.834983')
  3. Select table contents using vscode

Expected Results

Grid with value: 2019-08-01 19:51:12.834983

Selecting with psql on the command line returns the expected result.

Actual Results

Thu Aug 01 2019 19:51:12 GMT-0400 (Eastern Daylight Time) which is off by 4 hours.

And saving the results gives the incorrect time as well:

[
  {
    "timestamp_without_tz": "2019-08-01T23:51:12.834Z"
  }
]

Versions

VS Code 1.25.1 Plugin 1.1.8

a082651 avatar Aug 01 '19 20:08 a082651

My tables are also "without tz", saved as UTC. They are being correctly shifted to local time in results grid, but I would like option to turn this off (display them in UTC, i.e. unshifted to local). psql displays them as entered, UTC.

yzorg avatar Apr 08 '21 23:04 yzorg