Question

Concerning DB2 for i, are timestamp columns converted to UTC 0000 from the timezone specified in system setting QTIMZON? For example, if QTIMZON is set to UTC -0400 does any conversion to UTC 0000 take place before inserting a row?

I ask because MySQL and PostgreSQL both convert to/from UTC to the operating-system-specified timezone.

I am aware of the CURRENT TIMEZONE special register which leads me to believe no conversion is done automatically, but I wanted to be sure.

Was it helpful?

Solution

DB/2 for i does not appear to perform any timezone conversion according to the following test:

CHGSYSVAL SYSVAL(QTIMZON) VALUE(QN0500EST3)

 

CREATE TABLE QTEMP/TEST AS (SELECT NOW() TS FROM SYSIBM/SYSDUMMY1) WITH DATA

SELECT TS FROM QTEMP/TEST
....+....1....+....2....+.
TS                        
2014-04-21-17.52.17.813498

 

CHGSYSVAL SYSVAL(QTIMZON) VALUE(Q0000UTC)

 

SELECT TS FROM QTEMP/TEST
....+....1....+....2....+.
TS                        
2014-04-21-17.52.17.813498
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top