select SESSIONTIMEZONE from dual;
returns "Europe/Berlin"
(see http://docs.oracle.com/cd/B28359_01/server.111/b28286/functions150.htm )
"
SESSIONTIMEZONE
returns the time zone of the current session. The return type is a time zone offset (a character type in the format '[+|]TZH:TZM'
) or a time zone region name, depending on how the user specified the session time zone value in the most recent ALTER
SESSION
statement.... using the ORA_SDTZ
environment variable "The JDBC driver sets on the Session some date/time session parameters:
http://docs.oracle.com/cd/E13222_01/wls/docs100/jdbc_drivers/oracle.html
This code:
import
java.util.Calendar;
public class
TimeZoneHelper {
public static String getTimeZoneInfo()
{
String
result = "";
Calendar
now = Calendar.getInstance();
result +=
now.getTimeZone();
result += "_";
result +=
now.getTime();
return result;
}
}
returns this:
|
I understand that
there is a JVM property –
Duser.timezone=’BLA’
or better still you
can do
export
TZ="IST"
on the shell prompt
before you start WLS...
No comments:
Post a Comment