\copy (select * from t1) To 'filename.csv' With CSV HEADER
OR
COPY (select * from t1) TO '/var/lib/postgresql/f.csv' WITH CSV HEADER;
REF sql - Save PL/pgSQL output from PostgreSQL to a CSV file - Stack Overflow
select create_time from t limit 1;
create_time
------------------------
2018-09-15 03:46:52+00
(1 row)
select timezone('Asia/Shanghai', create_time) from t limit 1;
timezone
---------------------
2018-09-15 11:46:52
(1 row)