Часовой пояс EDT
не является действительным часовым поясом. Проверьте действительные имена часовых поясов с помощью этого запроса:
SELECT tzname, tzabbrev, TZ_OFFSET(tzname)
FROM V$TIMEZONE_NAMES
WHERE tzabbrev = 'EDT' OR tzname = 'EDT';
+-------------------------------------------------------+
|TZNAME |TZABBREV|TZ_OFFSET(TZNAME)|
+-------------------------------------------------------+
|America/Detroit |EDT |-04:00 |
|America/Fort_Wayne |EDT |-04:00 |
|America/Grand_Turk |EDT |-04:00 |
|America/Indiana/Indianapolis|EDT |-04:00 |
|America/Indiana/Marengo |EDT |-04:00 |
|America/Indiana/Petersburg |EDT |-04:00 |
|America/Indiana/Vevay |EDT |-04:00 |
|America/Indiana/Vincennes |EDT |-04:00 |
|America/Indiana/Winamac |EDT |-04:00 |
|America/Indianapolis |EDT |-04:00 |
|America/Iqaluit |EDT |-04:00 |
|America/Kentucky/Louisville |EDT |-04:00 |
|America/Kentucky/Monticello |EDT |-04:00 |
|America/Louisville |EDT |-04:00 |
|America/Montreal |EDT |-04:00 |
|America/Nassau |EDT |-04:00 |
|America/New_York |EDT |-04:00 |
|America/Nipigon |EDT |-04:00 |
|America/Pangnirtung |EDT |-04:00 |
|America/Santo_Domingo |EDT |-04:00 |
|America/Thunder_Bay |EDT |-04:00 |
|America/Toronto |EDT |-04:00 |
|Canada/Eastern |EDT |-04:00 |
|EST5EDT |EDT |-04:00 |
|US/East-Indiana |EDT |-04:00 |
|US/Eastern |EDT |-04:00 |
|US/Michigan |EDT |-04:00 |
|America/Cancun |EDT |-05:00 |
|America/Indiana/Tell_City |EDT |-05:00 |
|America/Jamaica |EDT |-05:00 |
|America/Port-au-Prince |EDT |-05:00 |
|Jamaica |EDT |-05:00 |
+-------------------------------------------------------+
Например, этот работает:
select
TO_TIMESTAMP_TZ ('Mon Jun 24 23:42:36 America/New_York 2019', 'Dy Mon DD HH24:MI:SS TZR YYYY') as "Creation Time"
from dual;
Формат TZD
используется для определения летнего времени, например, 2019-11-03 01:40:00
является неоднозначным, см.
ALTER SESSION SET ERROR_ON_OVERLAP_TIME = TRUE; -- default is FALSE
SELECT
TO_TIMESTAMP_TZ ('Sun Nov 03 01:42:36 America/New_York 2019', 'Dy Mon DD HH24:MI:SS TZR YYYY') AS "Creation Time"
FROM dual;
Error at line 2
ORA-01883: overlap was disabled during a region transition
SELECT
TO_TIMESTAMP_TZ ('Sun Nov 03 01:42:36 America/New_York EST 2019', 'Dy Mon DD HH24:MI:SS TZR TZD YYYY') AS "Creation Time A",
TO_TIMESTAMP_TZ ('Sun Nov 03 01:42:36 America/New_York EDT 2019', 'Dy Mon DD HH24:MI:SS TZR TZD YYYY') AS "Creation Time B"
FROM dual;
+-------------------------------------------------------------------------+
|Creation Time A |Creation Time B |
+-------------------------------------------------------------------------+
|03.11.2019 01:42:36.000000000 -05:00|03.11.2019 01:42:36.000000000 -04:00|
+-------------------------------------------------------------------------+