DB2 记录具有来自多个时区的时间戳
DB2 record have timestamps from multiple timezones
您好,我在大型机上有一个 db2 数据库,其中有网络应用程序和 phone 语音电话 ivr 应用程序写入的数据。它们都位于美国中部时区。 Web 应用程序正在重写并移至美国东部时间。插入记录都使用 sysdate 作为记录时间戳,例如记录创建或上次更新的时间。由于数据库查询是 "select ...... order by create_time" 或 "select .... order by update_time" 不同的时区导致顺序问题。
我想要一种在一个 TZ(可能是东部)中显示所有记录的方法。
select some_time_util(*,easternTZ) from table where condition=easternTz order by some_time_util( create_date, easten_tz)
union
select some_time_util(*,centralTZ) from table where condition=centralTz order by some_time_util( create_date, centeral_tz)
db2 如何支持时间戳和时区的概念?
您好,我在大型机上有一个 db2 数据库,其中有网络应用程序和 phone 语音电话 ivr 应用程序写入的数据。它们都位于美国中部时区。 Web 应用程序正在重写并移至美国东部时间。插入记录都使用 sysdate 作为记录时间戳,例如记录创建或上次更新的时间。由于数据库查询是 "select ...... order by create_time" 或 "select .... order by update_time" 不同的时区导致顺序问题。
我想要一种在一个 TZ(可能是东部)中显示所有记录的方法。
select some_time_util(*,easternTZ) from table where condition=easternTz order by some_time_util( create_date, easten_tz)
union
select some_time_util(*,centralTZ) from table where condition=centralTz order by some_time_util( create_date, centeral_tz)
db2 如何支持时间戳和时区的概念?