Getting Client-side Locale/TimeZone/Date?

A

Adam Lipscombe

Apologies if this is a no-brainer...


From within a JSP or struts action, I want get the date of the client machine that sent the Http
request.

How do I do that?


TIA - Adam
 
D

Dag Sunde

Adam said:
Apologies if this is a no-brainer...


From within a JSP or struts action, I want get the date of the client
machine that sent the Http request.

How do I do that?

Use client-side JavaScript to put the date into
a (hidden) form field, and POST it to the JPS/Action?
 
L

Lew

Dag said:
Use client-side JavaScript to put the date into
a (hidden) form field, and POST it to the JPS/Action?

Of course, the reported data
(whether obtained from JS or from HTTP headers) could vary widely from what
the server knows as the time, due to lack of server control over client clocks
or time zones.

- Lew
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,585
Members
45,080
Latest member
mikkipirss

Latest Threads

Top