How to handle Day Light Saving in Oracle database(如何在 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 数据库中处理夏令时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何在 Oracle 数据库中处理夏令时


基础教程推荐
- 什么是 orradiag_<user>文件夹? 2022-01-01
- 表 './mysql/proc' 被标记为崩溃,应该修复 2022-01-01
- oracle区分大小写的原因? 2021-01-01
- mysql选择动态行值作为列名,另一列作为值 2021-01-01
- 在多列上分布任意行 2021-01-01
- MySQL 中的类型:BigInt(20) 与 Int(20) 2021-01-01
- 二进制文件到 SQL 数据库 Apache Camel 2021-01-01
- 如何根据该 XML 中的值更新 SQL 中的 XML 2021-01-01
- 如何在 SQL 中将 Float 转换为 Varchar 2021-01-01
- 在 MySQL 中:如何将表名作为存储过程和/或函数参数传递? 2021-01-01