【Postgres】タイムゾーン変更

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# Postgres自体のタイムゾーン確認 root=# show timezone; TimeZone ---------- Etc/UTC (1 row) root=# select current_timestamp; current_timestamp ------------------------------- 2021-02-13 21:37:32.998281+09 (1 row) # タイムゾーン変更 root=# Set timezone TO 'Asia/Tokyo'; SET root=# show timezone; TimeZone ------------ Asia/Tokyo (1 row) root=# # データベース単位での変更もできる root=# ALTER DATABASE "testdb" SET timezone TO 'Asia/Tokyo'; ALTER DATABASE |