Re: SYSDATE vs CURRENT_DATE

From: Samuel Guiñales Cristobal <samuel.guinales_at_gmail.com>
Date: Tue, 28 Feb 2012 11:55:32 +0100
Message-ID: <CAF=AZ3AP_EPp92P-0_Wb4LX-n9dU-d8v-1dZtZA9oUvz5TgnnA_at_mail.gmail.com>



The time zone in the server:

echo $TZ -> MET-1METDST

In the database:

SQL> alter session set nls_date_format='DD-MON-YYYY hh24:mi:ss';

SQL> SELECT DBTIMEZONE FROM DUAL; DBTIME



+01:00

SQL> SELECT SESSIONTIMEZONE FROM DUAL; SESSIONTIMEZONE



+01:00

SQL> SELECT current_timestamp FROM DUAL;

CURRENT_TIMESTAMP



28/02/12 11:53:43,851868 +01:00

SQL> select sysdate from dual;

SYSDATE



28-FEB-2012 10:53:44 thanks, Regards
---
Samuel Guiñales Cristobal <samuel.guinales_at_gmail.com>
«La vida es breve; el arte, largo; la ocasión, fugaz; la experiencia,
engañosa; el juicio, difícil.» Hipócrates, Aforismos, I, 1



2012/2/28 Samuel Guiñales Cristobal <samuel.guinales_at_gmail.com>:

> Hello,
>
> Version: Oracle 9.2.0.8.0
> OS: HP-UX preoas B.11.23 U ia64 3960232104 unlimited-user license
>
> problem: one hour less in sysdate
> only when we make conections using listener in all databases.
>
> alter session set nls_date_format='DD-MON-YYYY hh24:mi:ss';
>
> SELECT SYSDATE,CURRENT_DATE  FROM DUAL;
>
> SYSDATE                         CURRENT_DATE
> --------------------------------        ------------------------------------
> 27-FEB-2012 16:44:22        27-FEB-2012 17:44:23
>
>
>  SQL> SELECT DBTIMEZONE, SESSIONTIMEZONE FROM DUAL;
>
> DBTIME      SESSIONTIMEZONE
> --------   -------------------
> +01:00         +01:00
>
> - OS:
> TZ=MET-1METDST
> date=17:44:23
>
> very strange behavior, happends with all database in this machine
>
> Regards
> ---
> Samuel Guiñales Cristobal <samuel.guinales_at_gmail.com>
> «La vida es breve; el arte, largo; la ocasión, fugaz; la experiencia,
> engañosa; el juicio, difícil.» Hipócrates, Aforismos, I, 1
-- http://www.freelists.org/webpage/oracle-l
Received on Tue Feb 28 2012 - 04:55:32 CST

Original text of this message