如何在 Oracle 数据库中处理夏令时 [英] How to handle Day Light Saving in Oracle database

查看:53
本文介绍了如何在 Oracle 数据库中处理夏令时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在其中一台 Oracle 数据库服务器中,当我触发Select dbtimezone from dual"时,它显示+01:00",这是否意味着在夏季时钟会提前一小时?.在另一台服务器上显示+00:00"是否意味着数据库服务器设置为 GMT ?但我在 oracle pl/sql 中使用 sysdate.客户端说 Aix 服务器在 DST 上,这是否意味着数据库服务器将在时钟更改后采用 AIX 服务器设置?如何解决这个问题.

In one of the Oracle database server it is showing "+01:00" when I fire the "Select dbtimezone from dual" does that mean in summer the clock will shift one hour ahead ?. In another server it is showing "+00:00" does that mean the database server setting is GMT ? but I am using the sysdate in oracle pl/sql. Client is saying the Aix server is on DST so would that mean the DB server will adopt the AIX server setting after clock change ? How to fix this problem.

推荐答案

我使用下面的命令解决了这个问题"从 DUAL 中选择时区 'GMT' 的 Systimestamp' 此命令将始终提供 GMT 日期和时间,而与操作系统时间无关.

I resolved this issue by using the below command "Select Systimestamp at time zone 'GMT' from DUAL' This command wil always give the GMT date and time irrespective of OS time.

这篇关于如何在 Oracle 数据库中处理夏令时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆