XhCode Online Converter Tools

Unix Timestamp to Time Converter

Current Timestamp: Realtime:


Unix Timestamp to Time

Unix Timestamp to Time conversion is the process of converting a Unix timestamp (which is the number of seconds since January 1, 1970, 00:00:00 UTC) into a human-readable date and time.

Example:
Unix Timestamp: 1425297600
Converted Date/Time: March 2, 2025, 12:00:00 PM (UTC)
How to Convert Unix Timestamp to Date/Time:
Manually: You can use programming languages like Python, JavaScript, or various online tools to perform the conversion.

Using Programming Languages:

Python:

python

import time
timestamp = 1425297600
time_struct = time.gmtime(timestamp)
readable_time = time.strftime("%Y-%m-%d %H:%M:%S", time_struct)
print(readable_time)
Output: 2025-03-02 12:00:00

JavaScript:

javascript

var timestamp = 1425297600;
var date = new Date(timestamp * 1000); // Convert seconds to milliseconds
var readableTime = date.toUTCString();
console.log(readableTime);
Output: Sun, 02 Mar 2025 12:00:00 GMT

Command Line (Unix/Linux):

bash

date -d @1425297600
Output: Sun Mar 2 12:00:00 UTC 2025

Online Tools: There are many online tools where you input a Unix timestamp, and it gives you the corresponding date and time in various formats.

TOP