跳到正文
RandNext
Esc

随机时间生成器

随机选一个时刻——可以限定在工作时间,用 12 或 24 小时制,需要的话加上秒。

  • 在浏览器中生成
  • 公平的密码学随机
  • 一键全部复制

你的时间

在你的浏览器中生成。按空格键再生成一次。

随机时间 API

以 JSON 获取随机时间结果。接口只读,少量使用无需 API 密钥,并支持跨域请求。

GET/api/v1/tools/random-time
curl https://randnext.com/api/v1/tools/random-time?from=9&to=17&format=24h&count=3

参数

参数类型作用(英文)默认值 / 允许的值
fromintegerEarliest hour of the day, using a 0–23 clock.默认:00 到 23
tointegerLatest hour of the day, using a 0–23 clock.默认:230 到 23
formatstringClock format used in the result.默认:24h24h, 12h
secondsbooleanInclude seconds as well as hours and minutes.默认:falsetrue 或 false
countintegerNumber of results to return.默认:11 到 50
查看参数、响应和限制 →

你可能还喜欢

使用方法

  1. 1设定最早和最晚的小时。
  2. 2选择 12 或 24 小时制以及是否显示秒。
  3. 3点“生成”。

常见问题

包括最后一个小时吗?

包括——9 到 17 的范围可能得到 9:00 到 17:59 之间的任意时间。

真的是随机的吗?

是的。数值来自浏览器的密码学安全随机源,每个可能的值机会都相同。