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 数据库中处理夏令时


- 在SQL中,如何为每个组选择前2行 2021-01-01
- SQL 临时表问题 2022-01-01
- 使用 Oracle PL/SQL developer 生成测试数据 2021-01-01
- 以一个值为轴心,但将一行上的数据按另一行分组? 2022-01-01
- 如何将 Byte[] 插入 SQL Server VARBINARY 列 2021-01-01
- 如何使用 pip 安装 Python MySQLdb 模块? 2021-01-01
- 如何将 SonarQube 6.7 从 MySQL 迁移到 postgresql 2022-01-01
- 远程 mySQL 连接抛出“无法使用旧的不安全身份验证连接到 MySQL 4.1+"来自 XAMPP 的错误 2022-01-01
- 导入具有可变标题的 Excel 文件 2021-01-01
- 更改自动增量起始编号? 2021-01-01