cancel
Showing results for 
Search instead for 
Did you mean: 

Determine local client time

roland_spindler
Participant
0 Kudos

Hello,

Is there a way to determine the local time of the computer where the client is running?

All ABAP is processed on the server, so this is the time I get, but the client may be running in a different time zone.

Do I need Javascript? If yes, how?

Thanks in advance

Roland

Accepted Solutions (0)

Answers (2)

Answers (2)

roland_spindler
Participant
0 Kudos

So if several people share a user (e.g. for a web shop), this cannot be done?

Roland

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

So if several people share a user (e.g. for a web shop), this cannot be done?

>

> Roland

That would be true. However in almost all cases several people sharing a user is a violation of SAP licensing agreements. Even with Internet Users, you get a user switch to a unique ID for each login.

roland_spindler
Participant
0 Kudos

Ok, thanks for the quick answer.

Roland

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

Have you considered using SY-TIMLO and SY-DATLO. These are local time/date variables. As long as the user maintains his local time zone in his user profile, the system will calculate local time into these variables.

Otherwise there is no way in WDA to read the client time. This would require JavaScript which isn't allowed in Web Dynpro.