Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

User time zone

Dear Experts,

I have following problem. Portal server and end-user are situated in different time zones. In my portal component I need to show end-user time, i.e. local time for user. But if I call function


it returns a local time of server and not a local time of user.

As I know, I can get time zone information from user personalization:

((IUser) request.getUser()).getTimeZone()

But often, users don't define they time zone information. I suppose, there is ability to get such information from request object, because, as I know, http-browser transmits time zone information in http-request.

But all my attempts to get this information from request was not successful:


Both functions don't return time zone information.

Does anybody have any ideas about it?

Former Member

Hi Egor,

> I know, http-browser transmits time zone information

> in http-request

IE? If I call, I cannot see the TZ anywhere, checked by HTTPWatch. There is also no corresponding setting within IE. You could only map prefered languages to locales, but that doesn't work really proper, for they work over different time zones.

Also see - no automatic detection.

Also see

So I would suggest to use the user's time zone, and if not set, to use the server's time. It's the fault of the user admins if the time zone is not set!

> Both functions don't return time zone information

Right. And as said, mapping the locale to a time zone is a (bad) workaround, nothing I would advise.

Hope it helps


0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question