WebSphere Portal Server - What sets TimeZone in Portal 6.0?

This is Interesting: Free IT Magazines  
Home > Archive > WebSphere Portal Server > March 2007 > What sets TimeZone in Portal 6.0?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author What sets TimeZone in Portal 6.0?

2007-03-27, 1:20 pm

Hi NG!

I have a weird problem, that something sets a TimeZone in Portal 6.0

I have a portlet that executes following code:

System.out.println("user.country = " + System.getProperty( "user.country" ) );
System.out.println("java.home = " + System.getProperty( "java.home" ) );
System.out.println("user.timezone = " + System.getProperty( "user.timezone" ) );
System.out.println("Default-Zeitzone: "+TimeZone.getDefault());

The method getDefault() of java.util.TimeZone gets the timezone of the host,
determined by the system-property "user.timezone". If user.timezone is not given, it is tried to get the Timezone by user.country. If this fails
the timezone is set to GMT.

If I run the above code on Portal 5.1.0.4 everything runs fine. The Timezones
user.timezone and Default-Timezone match.

If I run it on portal 6.0.0.1 I get following output:

user.country = US
java.home = C:\Programme\IBM\WebSphere\AppServer\jav
a\jre
user.timezone = Europe/Berlin
Default-Zeitzone: sun.util.calendar.ZoneInfo[id="GMT" ,offset=0,dstSavings=0,useDaylight=false
,transitions=0,lastRule=null]

Though the user.timezone is set to Europe/Berlin, the Default-Timezone is GMT.

I would really appreciate any hints regarding this issue!

Greetings, Herbert

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com