server clock time
hi,
i have problem regrding clock time display..
i have an application( front end jsp, database used mysql, tomcat server) running on a client system..fine....
in this application whenever client logs in login time( ltime when user logs in not when activity is started) is displayed and the time taken is from server's clock...
i have one more item calledstart time (when activity is started)&end time (when activity ends)to record time of the user for checking how much time he is using the application....to know the end time i use user defined timer which increments ..... but tthe problem is when u change the client s system time that change is reflected in my application's end time & strat time but login time is not affected... i dont want my application s time to be affected when u change the client system time.... i want my apllication to follow server time
uuuuuuuufffffffffffffffffffff...... can anybody help me.....
thanks in advance
[1026 byte] By [
gania] at [2007-10-3 0:30:04]

my code goes here..............
<SCRIPT language="JavaScript">
function startclock()
{
var thetime=new Date();
var nhours=thetime.getHours();
var nmins=thetime.getMinutes();
var nsecn=thetime.getSeconds();
var AorP=" ";
/*if (nhours>=12)
AorP="P.M.";
else
AorP="A.M.";*/
if (nhours>=25)
nhours-=24;
/*if (nhours==0)
nhours=12;*/
if (nsecn<10)
nsecn="0"+nsecn;
if (nmins<10)
nmins="0"+nmins;
if (nhours<10)
nhours="0"+nhours;
document.clockform.clockEnds.value=nhours+":"+nmins+":"+nsecn/*+" "+AorP*/;
setTimeout('startclock()',1000);
gania at 2007-7-14 17:23:08 >

Hi,Can yo please give help to get the server time.I am not able to get any guidance to get the server time.in my work i need to just get the server time.Any methods or packages to be imported for that?.Expecting your reply.Thanks in advance,R.Ramesh.
Hi Mahes,
For this case you have to save server timing in any text box when every JSP page is created and calculated according to that.
You can fetch server timing by writing java code in scripts like
<%@ page import="java.util.Date"%>
<%
Date a = new Date();
%>
This variable have server date <%=a%>
Hi gani,Can yo please give help to get the server time.I am not able to get any guidance to get the server time.in my work i need to just get the server time.Any methods or packages to be imported for that?.Expecting your reply.Thanks in advance,R.Ramesh.