AFAIK java stores dates in long variables as milliseconds. Consequently someday there will be no value (cause long has a maximum) which will correspond to the time of that instant. Do you know when it will happen?
See Question&Answers more detail:osAFAIK java stores dates in long variables as milliseconds. Consequently someday there will be no value (cause long has a maximum) which will correspond to the time of that instant. Do you know when it will happen?
See Question&Answers more detail:osIt's easy enough to find out:
public class Test {
public static void main(String[] args) {
System.out.println(new java.util.Date(Long.MAX_VALUE));
}
}
Gives output (on my box):
Sun Aug 17 07:12:55 GMT 292278994
You may need to subtract a bit from Long.MAX_VALUE
to cope with your time zone overflowing the range of long, but it will give a reasonable ballpark :)