RE: Use of CURRENT_DATE vs SYSDATE and DST
- From: "Bobak, Mark" <Mark.Bobak@xxxxxxxxxxxxxxx>
- To: <Thomas.Mercadante@xxxxxxxxxxxxxxxxx>, <oracle-l@xxxxxxxxxxxxx>
- Date: Thu, 22 Mar 2007 16:13:27 -0400
SYSDATE reports the time from the OS.
CURRENT_DATE is based on the session's time_zone. (Alter session set
time_zone='...')
--
Mark J. Bobak
Senior Oracle Architect
ProQuest/CSA
"There are 10 types of people in the world: Those who understand
binary, and those who don't."
________________________________
From: oracle-l-bounce@xxxxxxxxxxxxx
[mailto:oracle-l-bounce@xxxxxxxxxxxxx] On Behalf Of Mercadante, Thomas F
(LABOR)
Sent: Thursday, March 22, 2007 3:19 PM
To: oracle-l@xxxxxxxxxxxxx
Subject: Use of CURRENT_DATE vs SYSDATE and DST
All,
I had a developer ask me a question today that I missed in our
discussion regarding the DST patches. He showed me where:
SQL> select to_char(sysdate,'mm/dd/yyyy hh24:mi:ss'),
2 to_char(current_date,'mm/dd/yyyy hh24:mi:ss')
3 from dual;
Sysdate Current Date
----------------------------- -----------------------------
03/22/2007 15:14:24 03/22/2007 16:14:25
So after patching my database with the current DST patch (and not
patching the client), the value of CURRENT_DATE is incorrect - it is
15:14 right now. And what the heck does CURRENT_DATE return? One hour
ahead? I would expect it to be one hour behind (at 14:14) until the end
of March.
Does this make sense? And when I applied the client patches, the value
of CURRENT_DATE did not change???
I told my developer to not use CURRENT_DATE - stick to SYSDATE.
Tom
________________________________
This transmission may contain confidential, proprietary, or privileged
information which is intended solely for use by the individual or entity
to whom it is addressed. If you are not the intended recipient, you are
hereby notified that any disclosure, dissemination, copying or
distribution of this transmission or its attachments is strictly
prohibited. In addition, unauthorized access to this transmission may
violate federal or State law, including the Electronic Communications
Privacy Act of 1985. If you have received this transmission in error,
please notify the sender immediately by return e-mail and delete the
transmission and its attachments.
- References:
- Use of CURRENT_DATE vs SYSDATE and DST
- From: Mercadante, Thomas F \(LABOR\)
Other related posts:
- » Use of CURRENT_DATE vs SYSDATE and DST
- » RE: Use of CURRENT_DATE vs SYSDATE and DST
- » RE: Use of CURRENT_DATE vs SYSDATE and DST
- » RE: Use of CURRENT_DATE vs SYSDATE and DST
- » Re: Use of CURRENT_DATE vs SYSDATE and DST
- » Re: Use of CURRENT_DATE vs SYSDATE and DST
- » RE: Use of CURRENT_DATE vs SYSDATE and DST
- » RE: Use of CURRENT_DATE vs SYSDATE and DST
- Use of CURRENT_DATE vs SYSDATE and DST
- From: Mercadante, Thomas F \(LABOR\)