- postgrsql.conf内に書いた
timezone
の影響は受けない - embulkを実行するホストのタイムゾーンに影響する
create table timezone_test (
id int not null,
name varchar(255) not null,
updated_at timestamp without time zone
);
insert into timezone_test (id,name,update_at)
values (1,'test1','2020-07-09 00:00');
in:
type: postgresql
user: user
password: xxxx
host: localhost
database: embulk_test
table: timezone_test
out:
type: stdout
2020-07-08 15:00:00 UTC
->2020-07-09 00:00:00 +0900
# timezone Asia/Tokyo
embulk preview conf.yml
+---------+-------------+-------------------------+
| id:long | name:string | updated_at:timestamp |
+---------+-------------+-------------------------+
| 1 | test1 | 2020-07-08 15:00:00 UTC |
+---------+-------------+-------------------------+
Force set timezone to UTC
TZ=UTC embulk preview conf.yml
+---------+-------------+-------------------------+
| id:long | name:string | updated_at:timestamp |
+---------+-------------+-------------------------+
| 1 | test1 | 2020-07-09 00:00:00 UTC |
+---------+-------------+-------------------------+
- Java: 1.8.0_251
- embulk: 0.9.23
- embulk-input-postgresql: 0.10.1
- OS: macOS 10.15.5
- PostgreSQL: 12.3