I have an .sh script on my Linux server.
I need the date in milliseconds in Java, but everything I find on the net is giving me Unix Timestamp.
Like this: date=$(date -d 'today 00:00:00' "+%s")
I need java milliseconds, like here: https://www.fileformat.info/tip/java/date2millis.htm.
How do I get that easily without writing a long java code?
There has to be an easy solution.
Copyright Notice:Content Author:「Netuddki」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/74209721/how-to-get-date-in-java-util-date-instead-of-unix-timestamp-in-bash-script