I'm having a lot of trouble with getting an accurate system time and I wonder if anyone has some thoughts on this:
In my app, I caclulate a timestamp value as follows and use a query to retrieve the cookie data from a DB.
As you can see, I get the java.util.Date() and time()... this should get the local system time. Works fine in my
IDE.
however, on our hosted servers, the system time is correct as run by the bash Date command (i.e. not in the webapp!)--> gives correct local time there. However, in the webapp, the time is off by 8 hours!
here are the logs:
what I get from teh shell:
Is there another place where the
servlet or system can get it's time? Is there a way to make this system independent -- keep in mind that I'll have to make sure teh DB is in sync.
thanks for any insight... hopefully someone has had this trouble too.
_r