datetime - When will the java date collapse? -
afaik java stores dates in long variables milliseconds. consequently someday there no value (cause long has maximum) correspond time of instant. know when happen?
it's easy enough find out:
public class test { public static void main(string[] args) { system.out.println(new java.util.date(long.max_value)); } }
gives output (on box):
sun aug 17 07:12:55 gmt 292278994
you may need subtract bit long.max_value
cope time zone overflowing range of long, give reasonable ballpark :)
Comments
Post a Comment