Skip to main content
SiteIndex
开发者可以使用

时间戳转换器

在 Unix 时间戳与人类可读日期之间转换,支持秒和毫秒。

使用指南

交互式工具区

无需注册账号
Timestamp converter

An ISO value without an offset is read in the selected timezone; values ending in Z or an offset are honored as written.

Try:

Code snippets

JavaScript
const nowSeconds = Math.floor(Date.now() / 1000); // current
new Date(1700000000 * 1000).toISOString();
Python
import time, datetime
time.time()  # current seconds
datetime.datetime.fromtimestamp(1700000000, tz=datetime.timezone.utc)
SQL
SELECT EXTRACT(EPOCH FROM NOW()); -- current seconds (PostgreSQL)
SELECT TO_TIMESTAMP(1700000000); -- timestamp from seconds
Bash / shell
date +%s # current seconds
date -u -d @1700000000 # GNU date: show 1700000000 in UTC
Batch timestamp converter
时间戳转换器是什么?

在 Unix 时间戳与人类可读日期之间转换,支持秒和毫秒。

工作原理

在 Unix 时间戳与人类可读日期之间转换,支持秒和毫秒。

常见用途

在 Unix 时间戳与人类可读日期之间转换,支持秒和毫秒。

使用限制

结果可能因浏览器、网络、输入内容和外部服务而异。本工具仅供参考,不能替代专业诊断或建议。

常见问题
时间戳转换器是什么?
在 Unix 时间戳与人类可读日期之间转换,支持秒和毫秒。

相关工具