Re: how to retreive the ServletRequest time



Arne Vajhøj wrote:
srini.vinod@xxxxxxxxx wrote:
On Jan 14, 12:37 am, Lew <l...@xxxxxxxxxxxxx> wrote:
Arne Vajhøj wrote:
srini.vi...@xxxxxxxxx wrote:
I'm working a servlet and I'm trying to get the date of a
HttpServletRequest. I have tried using the getHeader(),
getDateHeader() and no use... I tried to get the list of header names
and printed it, the output was:
accept
referer
accept-language
accept-encoding
user-agent
host
connection
cookie
I'm not able to find any header related to date or time... Please help
me sort this out... I've been breaking my head for three days now...
The browser does not send time.
You will have to just grab the current time at the server.
Even if the browser did send time, you couldn't rely on it. Server time is
the way to go.
If I use the server time, how will I be able to know the client
machine time zone... What if the client is in a different timezone
from server...

You will not.

If you really need to know the time on the client then you will
need to do some JavaScript stuff to explicit submit it to the
server.

Even then, you cannot be certain that the time on the client is correct, or even in the correct time zone.

Why do you need the client time zone anyway?

Why not just store all times in UTC?

--
Lew
This post contains two requests for information.
.



Relevant Pages

  • Re: how to retreive the ServletRequest time
    ... I'm not able to find any header related to date or time... ... If I use the server time, how will I be able to know the client ... Even then, you cannot be certain that the time on the client is correct, or even in the correct time zone. ...
    (comp.lang.java.programmer)
  • Re: how to retreive the ServletRequest time
    ... I'm not able to find any header related to date or time... ... Even if the browser did send time, ... If I use the server time, how will I be able to know the client ...
    (comp.lang.java.programmer)
  • Re: Time Macine
    ... you can set a time in outlook to delay the delivery of messages ... > I have a client that sends me emial and his emial shows up and hour ... > Server Time Zone ... > My Server Time Zone ...
    (microsoft.public.exchange.admin)
  • Time Macine
    ... I have a client that sends me emial and his emial shows up and hour ... Server Time Zone ... My Server Time Zone ... I am Johnny ...
    (microsoft.public.exchange.admin)
  • Re: Cant send back null class reference as SOAP Header?
    ... State is maintained on the server (no ... the client actually maintains the key to the state ... If they then retry the request, the flag won't be sent, will it? ... The header is defined as Direction.InOut on every ...
    (microsoft.public.dotnet.framework.webservices)