| Author |
Tomcat showing wrong date
|
Karthikean Konangi
Greenhorn
Joined: Jan 31, 2008
Posts: 22
|
|
Hi, I am using Tomcat4.1.29 with Sun solaris 5.8. Operating system date is correct. But the taking by the Tomcat is wrong. its taking next day's date. How can i get correct date from tomcat. java.util.Date() in Servlet showing next day's date as current date. Please help me in this.
|
Regards,
KonangiK
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
|
Are you sure it's a Tomcat problem and not a leap year bug in your application's code?
|
Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
|
 |
Karthikean Konangi
Greenhorn
Joined: Jan 31, 2008
Posts: 22
|
|
Dear Ben, I am sure ,, this is not Leap year bug. Even in log files, created by tomcat while server startup,,, its showing wrong date . But i donot know where exactly tomcat picking this date. Even OS , applications out side of tomcat are Perfect. only Issue with applications running in this tomcat.
|
 |
Karthikean Konangi
Greenhorn
Joined: Jan 31, 2008
Posts: 22
|
|
Anybody please help me in this. How can i overcome this issue? Can i get OS date in servlet? if yes , how can i?
|
 |
William Brogden
Author and all-around good cowpoke
Rancher
Joined: Mar 22, 2000
Posts: 12271
|
|
I vaguely recall a report of a leap year related problem in earlier versions of Java that got fixed in updates - is your Java updated to the latest version? Bill
|
Java Resources at www.wbrogden.com
|
 |
 |
|
|
subject: Tomcat showing wrong date
|
|
|