如何在Oracle数据库中处理日光节约 [英] How to handle Day Light Saving in Oracle database

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

问题描述

在其中一台Oracle数据库服务器中,当我启动从双重模式选择dbtimezone"时,它显示为"+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天全站免登陆