假设数据类型是没有 TIME ZONE 的 TIMESTAMP,您可以简单地指定所需的时区(在 TD13.10+ 中)。'America Central' 是具有夏令时的预定义时区:
CREATE VOLATILE TABLE vt ( ts TIMESTAMP(0)) ON COMMIT PRESERVE ROWS;
INSERT INTO vt (TIMESTAMP'2013-03-10 07:59:00');
INSERT INTO vt (TIMESTAMP'2013-03-10 08:01:00');
INSERT INTO vt (TIMESTAMP'2013-11-03 06:59:00');
INSERT INTO vt (TIMESTAMP'2013-11-03 07:01:00');
SEL ts, ts AT 'America Central' AS CST
FROM vt
ORDER BY 1;
*** Query completed. 4 rows found. 2 columns returned.
*** Total elapsed time was 1 second.
ts CST
------------------- -------------------------
2013-03-10 07:59:00 2013-03-10 01:59:00-06:00
2013-03-10 08:01:00 2013-03-10 03:01:00-05:00
2013-11-03 06:59:00 2013-11-03 01:59:00-05:00
2013-11-03 07:01:00 2013-11-03 01:01:00-06:00