A timestamp is a way to represent a specific moment as a number. In development, Unix Timestamp is widely used.
Unix Timestamp is the number of seconds elapsed since January 1, 1970 00:00:00 UTC.
Why use timestamps
Computer systems handle dates and times more efficiently as numbers than as text.
Timestamps give you:
Easier time math Easier sorting Consistent time handling across systems
For example, subtracting two timestamps gives you the time difference.
Where they are used
Timestamps are used in many systems:
Log entries Database time storage API response data File creation time
Wrap-up
Timestamps are one of the basic ways to handle time in development. Expressing date and time as numbers makes calculation and comparison straightforward.