Hello Oracle Gurus,

I meet a difficult issue to get current timezone from Oracle 8i by Java Stored Procedure.

I read many forums and I got the same result of my coding. Oracle does not support all time zones as Hawaii, Indiana, ...
I test support time zone in Oracle 8i based on changing time zone from Windows setting in Oracle Server machine. Please see table below:
In Database Windows Setting Return from Oracle (write in Java Stored Procedure)
Alaskan Time (GMT-09:00) Alaska Alaska
Arizona Time (GMT-07:00) Arizona Mountain Time
Atlantic Time (GMT-04:00) Atlantic Time (Canada) GMT-04:00
Central Europe Time (GMT+01:00) Belgrade, Bratislava, Budapest, Ljubljana, Prague Central European Time
Central Time (GMT-06:00) Central Time (US & Canada) Central Time
Eastern Europe Time (GMT+02:00) Bucharest GMT+02:00
Eastern Time (GMT-05:00) Eastern Time (US & Canada) Eastern Time
Hawiian Time (GMT-05:00) Hawaii Greenwich Mean Time
Indiana Time (GMT-05:00) Indiana (East) Greenwich Mean Time

When I set Oracle local timezone as (GMT-05:00) Eastern Time (US & Canada) , it returns correctly, but when I set Oracle timezone as (GMT-05:00) Hawaii , it returns GMT, incorrectly.
When I write my code in console application, it returns well, but when I use my code in Java Stored Procedure, it returns incorrectly. Please see my code as belows:

create or replace java source named "GetTimeZone" as
import java.util.*;
import java.io.*;
public class GetTimeZone {
public static String currentTimezone (){
// get the local timezone
TimeZone tz = TimeZone.getDefault();
return zone;



create or replace function Get_TimeZone return varchar2
as language java
name 'GetTimeZone.currentTimezone() return java.lang.String';

create or replace procedure outtimezone as
sTimezone varchar2(100);
sTimezone := Get_TimeZone();
dbms_output.put_line( sTimezone );


Is that really Oracle does not support these timezones like Hawaii, ... by using Java? Or could you please show me another way to do that?

I approciate your reply. Thanks for your reading,
Tai, email: taicao@psv.com.vn