Re: how to retreive the ServletRequest time
- From: Lew <lew@xxxxxxxxxxxxx>
- Date: Sun, 13 Jan 2008 18:20:18 -0500
Arne Vajhøj wrote:
srini.vinod@xxxxxxxxx wrote:On Jan 14, 12:37 am, Lew <l...@xxxxxxxxxxxxx> wrote:Arne Vajhøj wrote:If I use the server time, how will I be able to know the clientsrini.vi...@xxxxxxxxx wrote:Even if the browser did send time, you couldn't rely on it. Server time isI'm working a servlet and I'm trying to get the date of aThe browser does not send time.
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...
You will have to just grab the current time at the server.
the way to go.
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.
.
- Follow-Ups:
- Re: how to retreive the ServletRequest time
- From: Arne Vajhøj
- Re: how to retreive the ServletRequest time
- References:
- how to retreive the ServletRequest time
- From: srini . vinod
- Re: how to retreive the ServletRequest time
- From: Arne Vajhøj
- Re: how to retreive the ServletRequest time
- From: Lew
- Re: how to retreive the ServletRequest time
- From: srini . vinod
- Re: how to retreive the ServletRequest time
- From: Arne Vajhøj
- how to retreive the ServletRequest time
- Prev by Date: Re: how to retreive the ServletRequest time
- Next by Date: Re: how to retreive the ServletRequest time
- Previous by thread: Re: how to retreive the ServletRequest time
- Next by thread: Re: how to retreive the ServletRequest time
- Index(es):
Relevant Pages
|