Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> date differences between database and server
Hi all,
I ran into the following date problem:
I have the value 1137452400 which are the seconds from 01.01.1970
00:00:00 to 17.01.2006 00:00:00 (unix epoche).
When I reconvert this value on a Unix-system (IBM AIX 5.2) to a date, I
get the right date 17.01.2006 00:00:00.
$ /usr/bin/perl -le 'print scalar localtime(shift);' 1137452400
When I convert this value in sqlplus I get 16.01.2006 23:00:00. sqlplus> select to_date( '01.01.1970 00:00:00', 'dd.mm.yyyy hh24:mi:ss') + 1/86400 * 1137452400 from dual;
The database is running on the same machine and the output of
sqlplus> select sysdate from dual;
correspons to the output of
$ date'
at the shell.
Only in the seconds conversion thing there is one hour missing. Of course that has something to do with timezone settings. But I cant figure out what is right or wrong. Please help searching this one hour.
The AIX Environment concerning locale is like
NLS_LANGUAGE GERMAN NLS_TERRITORY GERMANY NLS_CALENDAR GREGORIAN NLS_DATE_FORMAT DD.MM.RR NLS_DATE_LANGUAGE GERMAN NLS_TIME_FORMAT HH24:MI:SSXFF NLS_TIMESTAMP_FORMAT DD.MM.RR HH24:MI:SSXFF NLS_TIME_TZ_FORMAT HH24:MI:SSXFF TZH:TZM NLS_TIMESTAMP_TZ_FORMAT DD.MM.RR HH24:MI:SSXFF TZH:TZM
Any advice is highly welcome and appreciated. Thanks! Carsten Received on Wed Jan 25 2006 - 06:00:53 CST
![]() |
![]() |