🔍

首页Home › 日期时间Date & Time

🎲 生成随机 Unix 时间戳Generate Random Unix Time

在给定秒级范围内随机生成 Unix 时间戳。输入两行:最小、最大(秒)。本地处理。可设置「个数」、「种子」。Random Unix timestamps in a second range. Two lines: min, max. Processed locally. Settings: Count, Seed.

使用说明与常见问题How-to & FAQ

「生成随机 Unix 时间戳」是什么?What is the Generate Random Unix Time tool?

在给定秒级范围内随机生成 Unix 时间戳。输入两行:最小、最大(秒)。本地处理。可设置「个数」、「种子」。Random Unix timestamps in a second range. Two lines: min, max. Processed locally. Settings: Count, Seed.

如何使用「生成随机 Unix 时间戳」?How do I use the Generate Random Unix Time tool?

第一行输入最小时间戳、第二行输入最大时间戳(秒),设置个数和种子,下方即生成随机时间戳。Enter the minimum timestamp on the first line and the maximum on the second (in seconds), set Count and Seed, and the random timestamps appear below.

可以输入哪些数?What values can I enter?

十进制整数秒,可带负号,范围 ±9007199254740991(±2^53-1),所以每个结果都是精确整数;1e3、0x10、小数会报错,只需两行,多余的行会报出行号。Whole decimal numbers of seconds, optionally negative, from -9007199254740991 to 9007199254740991 (±2^53-1), so every result is an exact integer. 1e3, 0x10 and decimals give an error. Only two lines are needed; extra lines are reported with their line numbers.

大范围也是均匀的吗?Is a very wide range still uniform?

是的。范围不超过 2^32 时直接抽取;更大的范围用 64 位随机数加拒绝采样,每个整数的概率相同。Yes. Ranges up to 2^32 values are drawn directly; wider ranges use 64-bit random numbers with rejection sampling, so every integer is equally likely.

怎样得到可复现的结果?How do I get the same result again?

填写相同的“种子”会得到相同的结果;把种子留空则每次使用浏览器的安全随机数(crypto.getRandomValues),结果每次不同。The same Seed always gives the same result. Leave Seed empty to use the browser's secure random numbers (crypto.getRandomValues), which give a different result each time.

Unix 时间戳和时区有关吗?Do time zones affect Unix timestamps?

无关。Unix 时间戳是自 1970-01-01 00:00:00 UTC 起的秒数,本身不带时区;本工具只处理这些整数,不读取设备时区。No. A Unix timestamp counts seconds since 1970-01-01 00:00:00 UTC and has no time zone of its own; this tool only works with those whole numbers and never reads your device time zone.

输入和输出是什么样的?What does the input and output look like?

例如在「生成随机 Unix 时间戳」中输入 0 ⏎ 100,「个数」设为 3,「种子」设为 1,输出为:84 ⏎ 12 ⏎ 83(⏎ 表示换行)。With "Count" set to 3 and "Seed" set to 1, the input 0 ⏎ 100 becomes 84 ⏎ 12 ⏎ 83 (⏎ marks a line break).

有哪些选项可以调整?What options can I adjust?

「生成随机 Unix 时间戳」的设置:「个数」默认 5;「种子」默认 1。每次生成结果都按当前设置处理。Settings in the Generate Random Unix Time tool — "Count" default 5; "Seed" default 1. The result always uses the current settings.

「生成随机 Unix 时间戳」免费吗?需要注册吗?Is the Generate Random Unix Time tool free? Do I need an account?

「生成随机 Unix 时间戳」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The Generate Random Unix Time tool is completely free with no sign-up or install and works on phones and desktops; what you enter is processed only in your browser.

相关工具Related tools

⏱ 生成 Unix 时间戳序列Generate Unix Time Sequence⏱ Unix 时间戳转人类时间Convert Unix Time to Human Time⏰ 生成时间序列Generate Time Sequence📅 递增日历日期Increment Calendar Date⏰ 递增时钟时间Increment Clock Time🪞 镜像时钟时间Mirror Clock Time♈ 列出全部星座Print All Zodiac Signs📅 四舍五入日历日期Round Calendar Date⏰ 四舍五入时钟时间Round Clock Time📐 按夹角反推时钟时间Set Clock Hand Angle🔢 排序日历日期Sort Calendar Dates🔢 排序时钟时间Sort Clock Times

← 全部工具All tools