UNIX timestamp is a time system for describing a moment in time in second also known as Epoch timestamp and POSIX timestamp. The UNIX timestamp is the number of seconds that have been counted since the start of January 1, 1970 (UTC) without leap seconds.
Therefore, 1 day in the UNIX timestamp is treated equally as if it has 86,400 seconds which is different from UTC that always includes leap seconds.
The UNIX timestamp is counted simultaneously throughout the world regardless of timezones which means a UNIX timestamp represents the certain moment in second at any place of the world. Therefore, a UNIX timestamp can be converted to any timezone as a result.
The example UNIX timestamp below represents the time 07:52:04 (UTC) on August 17, 2004 while it's also 03:52:04 (America/New York) on August 17, 2004 at the same moment.
You can easily get the current UNIX timestamp on Linux and macOS just by typing the following command in the terminal. The result based on your system clock will be displayed accordingly.
date +%s 1574913970
In computer programming, there exists the built-in method for getting the current UNIX timestamp in most programming languages so that developers can handle time-related functions with ease.
const currentTimestamp = Math.floor(Date.now() / 1000); // Get the current UNIX timestamp in milliseconds using the built-in method Date.now(), and then convert it to seconds by dividing it with 1000.
moment().unix(); // 1574914824