PostgreSQL 13.2でタイムゾーンを確認する方法

環境
Windows 10 Home 64bit
PostgreSQL 13.2

操作方法
1.タイムゾーンを確認します

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
postgres=# show timezone;
TimeZone
------------
Asia/Tokyo
(1)
postgres=# show timezone; TimeZone ------------ Asia/Tokyo (1 行)
postgres=# show timezone;
  TimeZone
------------
 Asia/Tokyo
(1 行)

2.タイムスタンプを確認します

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
postgres=# select current_timestamp;
current_timestamp
-------------------------------
2022-07-22 23:59:48.883243+09
(1)
postgres=# select current_timestamp; current_timestamp ------------------------------- 2022-07-22 23:59:48.883243+09 (1 行)
postgres=# select current_timestamp;
       current_timestamp
-------------------------------
 2022-07-22 23:59:48.883243+09
(1 行)

 

PostgreSQL

Posted by arkgame