0

I'm using Postgresql 9.6 and pgAdmin 4. Fresh install on both Windows and Mac, happens on both.

I need to store the current time and date.

None of my timestamp functions are returning times.

Time and Date work fine

SELECT CURRENT_DATE

Output: 2016-07-15

SELECT CURRENT_TIME

Output: 14:27:22.333352+01:00

SELECT CURRENT_TIMESTAMP

Output: 2016-07-15T00:00:00Z

Expected: 2016-07-15T14:27:22+01:00

SELECT now()

Output: 2016-07-15T00:00:00Z

Expected: 2016-07-15T14:27:22+01:00

What is the problem here?

3 Answers3

0
set timezone TO 'GMT';

SET TIME ZONE 'UTC';

OR

You can set timezone param into pgsql/data/postgresql.conf file:

timezone = 'US/Central'

and then restart postgresql sever.

rajeev
  • 115
  • 8
0

The problem is a bug in pgAdmin 4.

Timestamps are displayed incorrectly with the time set to 00:00:00Z The data is stored correctly and the correct time can be observed using a different a different client such as psql

0

This issue has been resolved with newer version of pgAdmin4.

Murtuza Z
  • 5,639
  • 1
  • 28
  • 52