Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat showing wrong date

 
Karthikean Konangi
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you sure it's a Tomcat problem and not a leap year bug in your application's code?
 
Karthikean Konangi
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13061
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic