Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

NEW_TIME returns error: invalid timezone

2827010Nov 18 2010 — edited Nov 18 2010
(using oracle XE 10g universal)
Following statement gives an error:
select to_char(new_time(sysdate,'CET','GMT'),'dd-mm-yyyy HH24:MI') from dual;
When i change CET to something like PST it does work so GMT is known by the DB but CET is not. CEST or WET or WEST also does not work.

When i query the v$timezone_names all those timezone do appear in the table so i thought i could use them in the new_time function...
Select tzname,tzabbrev from v$timezone_names where tzname like '%Paris%';
Europe/Paris LMT
Europe/Paris PMT
Europe/Paris WET
Europe/Paris WEST
Europe/Paris CEST
Europe/Paris CET
Europe/Paris WEMT

They all give the same error: invalid timezone.

When i execute following command:
select EXTRACT(timezone_abbr FROM current_timestamp)  FROM dual;
it returns CET

What am i doing wrong?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 16 2010
Added on Nov 18 2010
4 comments
1,091 views