Good day!
System.CurrentTimeMillis ()
in java gives the wrong result.
That is, by logs, it gives 1569633070510
, which is not reality.
But if you cut on the last three numbers (510)
, the result becomes reliable.
Tell me, please, where does he take these extra numbers and how can I remove them?
Answer 1, Authority 100%
This is milliseconds. Only you confused them with seconds.
1569633070510 / 1000/3600/24/365.25 = 49.74 (almost 50 years from January 1, 1970)
Answer 2
Use the java.sql.date
:
date currentdate = new date (System.CurrentTimemillis ());
translates to the current date – everything should be even ..