Tomcat Users List
> Subject: Re: Getting the date/time from the client
>
> A good devil's advocate question, or was it rhetorical?
>
> Either way it's got exactly the answer you'd expect, you'll set the date
> to whatever Locale the Request returns. Obviously.
&g
, and my
> clock set to Pacific Standard Time? Then what? (assume I am on the east
> coast of the USA...)
>
> Tim
>
>> -Original Message-
>> From: Vinu Varghese [mailto:[EMAIL PROTECTED]
>> Sent: Tuesday, July 11, 2006 8:05 AM
>> To: Tomcat Us
5 AM
> To: Tomcat Users List
> Subject: Re: Getting the date/time from the client
>
> Thanks Pid,
>
> I think that is a good idea
> Let me try
>
> - Regards
> Vinu
>
> Pid wrote:
> > you can get a Locale from the request, and adjust the time accordin
e:
<%
out.println("");
out.println("var currentTime = new Date();");
out.println("document.write(currentTime.toLocaleString());");
out.println("");
out.println("");
%>
SK
- Original Message - From: "Vinu Varghese&
;>
>>>>> SK
>>>>> - Original Message ----- From: "Vinu Varghese" <[EMAIL PROTECTED]>
>>>>> To: "Tomcat Users List"
>>>>> Sent: Tuesday, July 11, 2006 1:24 AM
>>>>> Subject: Re: Getting the dat
uest request, HttpServletResponse
response)
throws ServletException, IOException {
long l = request.getDateHeader("Date");
Date d = new Date(l);
System.out.println(d);
}
SK
- Original Message - From: "Vinu Varghese" <[EMAIL PROTECTED]>
To: &
ote:
>>> Vinu
>>> Yeah, you are right about it, I can't get getDateHeader working.
>>>
>>> For the solution one, I have setup like this for jsp and worked.
>>>
>>> <%@ page session="false" %>
>>>
>>>
>
t;
<%= application.getServerInfo() %>
Current Time:
<%
out.println("");
out.println("var currentTime = new Date();");
out.println("document.write(currentTime.toLocaleString());");
out.println("");
out.println("");
%>
SK
- Origin
al Message -
From: "Vinu Varghese" <[EMAIL PROTECTED]>
To: "Tomcat Users List"
Sent: Tuesday, July 11, 2006 2:23 AM
Subject: Re: Getting the date/time from the client
SK,
That javascript prints the current client time. But I want the client
time with the request.
T
t;);
out.println("document.write(currentTime.toLocaleString());");
out.println("");
out.println("");
%>
SK
- Original Message - From: "Vinu Varghese" <[EMAIL PROTECTED]>
To: "Tomcat Users List"
Sent: Tuesday, July 11, 200
out.println("var currentTime = new Date();");
out.println("document.write(currentTime.toLocaleString());");
out.println("");
out.println("");
%>
SK
- Original Message -
From: "Vinu Varghese" <[EMAIL PROTECTED]>
To: "Tomcat Users Lis
ot;Vinu Varghese" <[EMAIL PROTECTED]>
To: "Tomcat Users List"
Sent: Tuesday, July 11, 2006 12:51 AM
Subject: Getting the date/time from the client
Hi All,
I am doing a project in jsp/servlet and tomcat, which requires to take
the client da
Hi,
May be you can use:
request.getDateHeader()
Have a look at, there is a related thread there:
http://www.theserverside.com/discussions/thread.tss?thread_id=38542
Vinu Varghese <[EMAIL PROTECTED]> wrote: Hi All,
I am doing a project in jsp/servlet and tomcat, which requires to take
the cl
ate d = new Date(l);
System.out.println(d);
}
SK
- Original Message -
From: "Vinu Varghese" <[EMAIL PROTECTED]>
To: "Tomcat Users List"
Sent: Tuesday, July 11, 2006 12:51 AM
Subject: Getting the date/time from the client
Hi All,
I am doing a proj
Hi All,
I am doing a project in jsp/servlet and tomcat, which requires to take
the client date/time (ie the time of the machine the browser is
running). Is there any way to accomplish this ?
Thanks & regards
Vinu
--
Vinu Varghese
[EMAIL PROTECTED]
15 matches
Mail list logo