PostgreSQL 14.1でタイムゾーンを確認する

2022年3月17日

環境
Windows10 64bit
PostgreSQL 14.1

使用例
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;
now
-------------------------------
2022-03-17 14:37:07.256433+09
(1)
postgres=# select current_timestamp; now ------------------------------- 2022-03-17 14:37:07.256433+09 (1 行)
postgres=# select current_timestamp;
              now
-------------------------------
 2022-03-17 14:37:07.256433+09
(1 行)

 

PostgreSQL

Posted by arkgame