Добро пожаловать в форум, Guest  >>   Войти | Регистрация | Поиск | Правила | В избранное | Подписаться
Все форумы / Oracle Новый топик    Ответить
 ERROR_ON_OVERLAP_TIME, работает ли?  [new]
Barkovsky
Member

Откуда: Санкт-Петербург
Сообщений: 2655
Непонятно, почему не работает установка ERROR_ON_OVERLAP_TIME. Вроде бы, по доке, установка параметра указывает серверу использовать стандартное, зимнее время для спорных случаев. Или я что-то не так делаю?

дока
Oracle Database automatically determines, for any given time zone region, whether daylight saving is in effect and returns local time values accordingly. The datetime value is sufficient for Oracle to determine whether daylight saving time is in effect for a given region in all cases except boundary cases. A boundary case occurs during the period when daylight saving goes into or comes out of effect. For example, in the US-Pacific region, when daylight saving goes into effect, the time changes from 2:00 a.m. to 3:00 a.m. The one hour interval between 2 and 3 a.m. does not exist. When daylight saving goes out of effect, the time changes from 2:00 a.m. back to 1:00 a.m., and the one-hour interval between 1 and 2 a.m. is repeated.

The ERROR_ON_OVERLAP_TIME determines how Oracle Database should handle an ambiguous boundary datetime value—that is, a case in which it is not clear whether the datetime is in standard or daylight savings time.

Specify TRUE to return an error for the ambiguous overlap timestamp.

Specify FALSE to default the ambiguous overlap timestamp to the standard time. This is the default.

Connected to Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 
Connected as system
 
SQL> alter session set ERROR_ON_OVERLAP_TIME=false;
 
Session altered
 
SQL> select to_timestamp_tz('09.03.2008 02:00:01 US/Pacific','dd.mm.yyyy hh24:mi:ss TZR') from dual;
 
select to_timestamp_tz('09.03.2008 02:00:01 US/Pacific','dd.mm.yyyy hh24:mi:ss TZR') from dual
 
ORA-01878: specified field not found in datetime or interval
 
SQL> alter session set ERROR_ON_OVERLAP_TIME=true;
 
Session altered
 
SQL> select to_timestamp_tz('09.03.2008 02:00:01 US/Pacific','dd.mm.yyyy hh24:mi:ss TZR') from dual;
 
select to_timestamp_tz('09.03.2008 02:00:01 US/Pacific','dd.mm.yyyy hh24:mi:ss TZR') from dual
 
ORA-01878: specified field not found in datetime or interval
 
SQL> 
21 апр 09, 18:18    [7094218]     Ответить | Цитировать Сообщить модератору
Все форумы / Oracle Ответить