today.getTime() is 1 hour behind

Posted on 2007-03-29
Medium Priority
Last Modified: 2007-03-29
Hello ,
I am having problems with today.getTime()

my code is simply:
java.util.Date today = new java.util.Date();
new Timestamp (today.getTime()) )

but the timestamp is 1hr behind. My system time is correct

Is this releated to the day light savings stuff?

i would think today.getTime() would get my system time

Thanks for any help
Question by:paries

Expert Comment

ID: 18819063
This could be a daylight savings issue.  If you are on a Microsoft OS, go to the site and run windows updates to make sure their fixes are installed.
LVL 30

Accepted Solution

Mayank S earned 2000 total points
ID: 18819072
Yes you might need the day light saving update:


The latest version of the JDK has taken care of this.

Featured Post

7 new features that'll make your work life better

It’s our mission to create a product that solves the huge challenges you face at work every day. In case you missed it, here are 7 delightful things we've added recently to monday to make it even more awesome.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

600 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question