Java, date to long question. If we have :
String rand = new Long(System.currentTimeMillis()).toString(); logger.info("full :" + rand); rand = rand.substring(rand.length() -9); logger.info("Significant 8 :" + rand); Then is there a way to know for how many days / minutes is the result unique? Sample output :
full :1382519851946
Significant 8 :19851946
I guess the last 3 digits are the milli seconds, the next two 51 here are seconds, then 98 198 is hours and minutes?
Put differently if I take 10 digits will I get unique values for a full day? Assuming of course only one thread and one JVM is generating these.