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 Server 中单行 MERGE/upsert 的语法 2021-01-01
- 在 VB.NET 中更新 SQL Server DateTime 列 2021-01-01
- 将数据从 MS SQL 迁移到 PostgreSQL? 2022-01-01
- 无法在 ubuntu 中启动 mysql 服务器 2021-01-01
- ERROR 2006 (HY000): MySQL 服务器已经消失 2021-01-01
- SQL Server:只有 GROUP BY 中的最后一个条目 2021-01-01
- SQL Server 2016更改对象所有者 2022-01-01
- 使用pyodbc“不安全"的Python多处理和数据库访问? 2022-01-01
- Sql Server 字符串到日期的转换 2021-01-01
- 如何在 SQL Server 的嵌套过程中处理事务? 2021-01-01