'Matching Java timestamp code to javascript
I have this code which showing sets the timestamp to be in a specific format written in
Java:
timeStamp = System.currentTimeMillis();
writer.write(String.format("%d, %f, %s\n", timeStamp, evt.values[1], otherstr ));
I am using javascript so I need to translate it.
I currently have this:
const timeStamp = + new Date();
console.log(timeStamp);
I can't test the Java one as I don't know Java so I'm asking here.
Would my javascript code match the Java timestamp?
If not, how can I match it in Javascript?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
