timestamp postgres
INSERT INTO timestamp_demo (ts, tstz) VALUES('2016-06-22 19:10:25-07','2016-06-22 19:10:25-07'); Code language: SQL (Structured Query Language) (sql)
Source: www.postgresqltutorial.com
timestamp postgres
SELECT ts, tstz FROM timestamp_demo; Code language: SQL (Structured Query Language) (sql)
Source: www.postgresqltutorial.com
timestamp postgres
SELECT ts, tstz FROM timestamp_demo; Code language: SQL (Structured Query Language) (sql)
Source: www.postgresqltutorial.com
timestamp postgres
SET timezone = 'America/New_York'; Code language: SQL (Structured Query Language) (sql)
Source: www.postgresqltutorial.com
timestamp postgres
SET timezone = 'America/Los_Angeles'; Code language: SQL (Structured Query Language) (sql)
Source: www.postgresqltutorial.com
timestamp postgres
SHOW TIMEZONE; Code language: SQL (Structured Query Language) (sql)
Source: www.postgresqltutorial.com
timestamp postgres
ts | tstz ---------------------+------------------------ 2016-06-22 19:10:25 | 2016-06-22 19:10:25-07 (1 row) Code language: SQL (Structured Query Language) (sql)
Source: www.postgresqltutorial.com
timestamp postgres
TimeZone --------------------- America/Los_Angeles (1 row) Code language: SQL (Structured Query Language) (sql)
Source: www.postgresqltutorial.com
timestamp postgres
ts | tstz ---------------------+------------------------ 2016-06-22 19:10:25 | 2016-06-22 22:10:25-04 (1 row) Code language: SQL (Structured Query Language) (sql)
Source: www.postgresqltutorial.com
timestamp postgres
CREATE TABLE timestamp_demo ( ts TIMESTAMP, tstz TIMESTAMPTZ ); Code language: SQL (Structured Query Language) (sql)
Source: www.postgresqltutorial.com