cancel
Showing results for 
Search instead for 
Did you mean: 

client timezone

Former Member
0 Kudos

Hi,

I searched in the WebDynPro API, for a way to get the timezone from the current client session. I found that it is only possible to get the client Locale, but not the actual TimeZone. So, if i want to dynamically change dates/times for anonymous clients, i will have to map locales to timezones.. which is not the best way to achieve it , is it? Is there any way to get the client's timezone from the WebDyNPro, or any other API(s)? Thanks a lot in advance.

Regards,

Angel

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Of course, but that's the server timezone, i.e the one of the system on which WebAS is installed. As i mentioned, i want to obtain the client TimeZone , and i also assume all clients are anonymous.

-Angel

Former Member
0 Kudos

Angel,

1. For anonymous user the only source of TimeZone information is locale.

2. For authenticated user you may get WDClientUser.getLoggedInUser(), then access IUser (from UME API) and get timezone on this object (if defined)

3. The last option has nothing to do with WD per se: you get remote address of HTTP request, try to resolve it to geo-position in any form (check xmethods site -- there are some ws available for this task), and finally map position to time zone.

Valery Silaev

EPAM Systems

http://www.NetWeaverTeam.com

Former Member
0 Kudos

Hi,

Pls check the java class - java.util.TimeZone,

It has a static method - getDefault() , which gives the timwezone of the host system.

Check the methods of the TimeZone class for further operations - <<http://java.sun.com/j2se/1.4.2/docs/api/java/util/TimeZone.html>>

Thanks & Regards,

Renjith