const unixSeconds = 1711238400;
const date = new Date(unixSeconds * 1000); // Convert to milliseconds console.log(date.toISOString());
// "2024-03-24T00:00:00.000Z" console.log(date.toLocaleDateString('en-US'));
// "3/24/2024" console.log(date.toLocaleString('en-US', { timeZone: 'America/New_York' }));
// "3/23/2024, 8:00:00 PM"
const unixSeconds = 1711238400;
const date = new Date(unixSeconds * 1000); // Convert to milliseconds console.log(date.toISOString());
// "2024-03-24T00:00:00.000Z" console.log(date.toLocaleDateString('en-US'));
// "3/24/2024" console.log(date.toLocaleString('en-US', { timeZone: 'America/New_York' }));
// "3/23/2024, 8:00:00 PM"
const unixSeconds = 1711238400;
const date = new Date(unixSeconds * 1000); // Convert to milliseconds console.log(date.toISOString());
// "2024-03-24T00:00:00.000Z" console.log(date.toLocaleDateString('en-US'));
// "3/24/2024" console.log(date.toLocaleString('en-US', { timeZone: 'America/New_York' }));
// "3/23/2024, 8:00:00 PM"
const unixMs = 1711238400000;
const date = new Date(unixMs); // No multiplication needed console.log(date.toISOString());
// "2024-03-24T00:00:00.000Z"
const unixMs = 1711238400000;
const date = new Date(unixMs); // No multiplication needed console.log(date.toISOString());
// "2024-03-24T00:00:00.000Z"
const unixMs = 1711238400000;
const date = new Date(unixMs); // No multiplication needed console.log(date.toISOString());
// "2024-03-24T00:00:00.000Z"
function formatUnixTimestamp(unixSeconds) { const date = new Date(unixSeconds * 1000); return date.toLocaleString('en-US', { year: 'numeric', month: 'long', day: 'numeric', hour: '2-digit', minute: '2-digit', timeZoneName: 'short' });
} console.log(formatUnixTimestamp(1711238400));
// "March 24, 2024 at 12:00 AM UTC"
function formatUnixTimestamp(unixSeconds) { const date = new Date(unixSeconds * 1000); return date.toLocaleString('en-US', { year: 'numeric', month: 'long', day: 'numeric', hour: '2-digit', minute: '2-digit', timeZoneName: 'short' });
} console.log(formatUnixTimestamp(1711238400));
// "March 24, 2024 at 12:00 AM UTC"
function formatUnixTimestamp(unixSeconds) { const date = new Date(unixSeconds * 1000); return date.toLocaleString('en-US', { year: 'numeric', month: 'long', day: 'numeric', hour: '2-digit', minute: '2-digit', timeZoneName: 'short' });
} console.log(formatUnixTimestamp(1711238400));
// "March 24, 2024 at 12:00 AM UTC"
fromtimestamp()
utcfromtimestamp()
from datetime import datetime, timezone unix_seconds = 1711238400 # UTC datetime
utc_dt = datetime.fromtimestamp(unix_seconds, tz=timezone.utc)
print(utc_dt)
# 2024-03-24 00:00:00+00:00 # Local system timezone
local_dt = datetime.fromtimestamp(unix_seconds)
print(local_dt)
# 2024-03-23 20:00:00 (example for UTC-4) # Formatted string
print(utc_dt.strftime('%B %d, %Y %H:%M:%S %Z'))
# March 24, 2024 00:00:00 UTC
from datetime import datetime, timezone unix_seconds = 1711238400 # UTC datetime
utc_dt = datetime.fromtimestamp(unix_seconds, tz=timezone.utc)
print(utc_dt)
# 2024-03-24 00:00:00+00:00 # Local system timezone
local_dt = datetime.fromtimestamp(unix_seconds)
print(local_dt)
# 2024-03-23 20:00:00 (example for UTC-4) # Formatted string
print(utc_dt.strftime('%B %d, %Y %H:%M:%S %Z'))
# March 24, 2024 00:00:00 UTC
from datetime import datetime, timezone unix_seconds = 1711238400 # UTC datetime
utc_dt = datetime.fromtimestamp(unix_seconds, tz=timezone.utc)
print(utc_dt)
# 2024-03-24 00:00:00+00:00 # Local system timezone
local_dt = datetime.fromtimestamp(unix_seconds)
print(local_dt)
# 2024-03-23 20:00:00 (example for UTC-4) # Formatted string
print(utc_dt.strftime('%B %d, %Y %H:%M:%S %Z'))
# March 24, 2024 00:00:00 UTC
from datetime import datetime, timezone unix_ms = 1711238400000 # Divide by 1000 to convert to seconds
utc_dt = datetime.fromtimestamp(unix_ms / 1000, tz=timezone.utc)
print(utc_dt.isoformat())
# 2024-03-24T00:00:00+00:00
from datetime import datetime, timezone unix_ms = 1711238400000 # Divide by 1000 to convert to seconds
utc_dt = datetime.fromtimestamp(unix_ms / 1000, tz=timezone.utc)
print(utc_dt.isoformat())
# 2024-03-24T00:00:00+00:00
from datetime import datetime, timezone unix_ms = 1711238400000 # Divide by 1000 to convert to seconds
utc_dt = datetime.fromtimestamp(unix_ms / 1000, tz=timezone.utc)
print(utc_dt.isoformat())
# 2024-03-24T00:00:00+00:00
-- Seconds to timestamp
SELECT TO_TIMESTAMP(1711238400);
-- 2024-03-24 00:00:00+00 -- Current Unix timestamp
SELECT EXTRACT(EPOCH FROM NOW())::BIGINT;
-- 1711238400
-- Seconds to timestamp
SELECT TO_TIMESTAMP(1711238400);
-- 2024-03-24 00:00:00+00 -- Current Unix timestamp
SELECT EXTRACT(EPOCH FROM NOW())::BIGINT;
-- 1711238400
-- Seconds to timestamp
SELECT TO_TIMESTAMP(1711238400);
-- 2024-03-24 00:00:00+00 -- Current Unix timestamp
SELECT EXTRACT(EPOCH FROM NOW())::BIGINT;
-- 1711238400
# Convert timestamp to date (Linux)
date -d @1711238400
# Sun Mar 24 00:00:00 UTC 2024 # macOS
date -r 1711238400
# Sun Mar 24 00:00:00 UTC 2024 # Current Unix timestamp
date +%s
# 1711238400
# Convert timestamp to date (Linux)
date -d @1711238400
# Sun Mar 24 00:00:00 UTC 2024 # macOS
date -r 1711238400
# Sun Mar 24 00:00:00 UTC 2024 # Current Unix timestamp
date +%s
# 1711238400
# Convert timestamp to date (Linux)
date -d @1711238400
# Sun Mar 24 00:00:00 UTC 2024 # macOS
date -r 1711238400
# Sun Mar 24 00:00:00 UTC 2024 # Current Unix timestamp
date +%s
# 1711238400
Math.floor(new Date('2024-03-24').getTime() / 1000)
int(datetime(2024, 3, 24, tzinfo=timezone.utc).timestamp())
9223372036854775807 - 0 → 1970-01-01 00:00:00 UTC
- 1000000000 → 2001-09-09 01:46:40 UTC
- 1711238400 → 2024-03-24 00:00:00 UTC - Paste your Unix timestamp into the input field (seconds or milliseconds — the tool auto-detects)
- See the converted date and time in UTC, your local timezone, and ISO 8601 format instantly
- Switch timezones using the dropdown to see the same moment in any timezone worldwide
- Convert in reverse: pick a date and time to get the corresponding Unix timestamp