Trần Khánh Ly
New member
How do I get the current timestamp in terminal?
Answer
On UNIX-like machines, which include Linux and macOS, you can type date +%s in the terminal and get the UNIX timestamp back:
Answer
On UNIX-like machines, which include Linux and macOS, you can type date +%s in the terminal and get the UNIX timestamp back:
- $ date +%s 1524379940.
- Date. now()
- new Date(). getTime() or new Date(). valueOf()
- Math. floor(Date. now() / 1000)
- ~~(Date. now() / 1000)
- +new Date.