import{_ as a,c as e,a as t,o as l}from"./app-Dgsdh8A6.js";const n={};function o(r,s){return l(),e("div",null,s[0]||(s[0]=[t(`<h1 id="获取当前时间戳" tabindex="-1"><a class="header-anchor" href="#获取当前时间戳"><span>获取当前时间戳</span></a></h1><h2 id="获取当前时间戳-1" tabindex="-1"><a class="header-anchor" href="#获取当前时间戳-1"><span>获取当前时间戳</span></a></h2><blockquote><p>https://api.bilibili.com/x/report/click/now<br> https://api.bilibili.com/x/click-interface/click/now</p></blockquote><p><em>请求方式：GET</em></p><p><strong>json回复：</strong></p><p>根对象：</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>code</td><td>num</td><td>返回值</td><td>0：成功</td></tr><tr><td>message</td><td>str</td><td>错误信息</td><td>默认为0</td></tr><tr><td>ttl</td><td>num</td><td>1</td><td></td></tr><tr><td>data</td><td>obj</td><td>信息本体</td><td></td></tr></tbody></table><p><code>data</code>对象：</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>now</td><td>num</td><td>当前的时间戳</td><td></td></tr></tbody></table><p><strong>示例：</strong></p><div class="language-shell line-numbers-mode" data-highlighter="shiki" data-ext="shell" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-shell"><span class="line"><span style="color:#DCDCAA;">curl</span><span style="color:#CE9178;"> &#39;https://api.bilibili.com/x/report/click/now&#39;</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div></div></div><details><summary>查看响应示例：</summary><div class="language-json line-numbers-mode" data-highlighter="shiki" data-ext="json" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-json"><span class="line"><span style="color:#D4D4D4;">{</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;code&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;message&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;0&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;ttl&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;data&quot;</span><span style="color:#D4D4D4;">: {</span></span>
<span class="line"><span style="color:#9CDCFE;">        &quot;now&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1592666471</span></span>
<span class="line"><span style="color:#D4D4D4;">    }</span></span>
<span class="line"><span style="color:#D4D4D4;">}</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></details><h2 id="获取适用于-rtc-的时间戳" tabindex="-1"><a class="header-anchor" href="#获取适用于-rtc-的时间戳"><span>获取适用于 RTC 的时间戳</span></a></h2><blockquote><p>https://api.live.bilibili.com/xlive/open-interface/v1/rtc/getTimestamp</p></blockquote><p><em>请求方法: GET</em></p><p><strong>JSON回复:</strong></p><p>根对象:</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>code</td><td>num</td><td>返回值</td><td>0:成功</td></tr><tr><td>message</td><td>str</td><td>错误信息</td><td>默认为 0</td></tr><tr><td>ttl</td><td>num</td><td>1</td><td></td></tr><tr><td>data</td><td>obj</td><td>信息本体</td><td></td></tr></tbody></table><p><code>data</code> 对象:</p><table><thead><tr><th>字段</th><th>类型</th><th>内容</th><th>备注</th></tr></thead><tbody><tr><td>timestamp</td><td>num</td><td>服务器端UTC时间戳</td><td></td></tr><tr><td>microtime</td><td>num</td><td>服务器端UTC时间戳 (毫秒)</td><td></td></tr></tbody></table><p><strong>示例:</strong></p><div class="language-shell line-numbers-mode" data-highlighter="shiki" data-ext="shell" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-shell"><span class="line"><span style="color:#DCDCAA;">curl</span><span style="color:#CE9178;"> &#39;https://api.live.bilibili.com/xlive/open-interface/v1/rtc/getTimestamp&#39;</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div></div></div><details><summary>查看响应示例:</summary><div class="language-json line-numbers-mode" data-highlighter="shiki" data-ext="json" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-json"><span class="line"><span style="color:#D4D4D4;">{</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;code&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">0</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;message&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#CE9178;">&quot;0&quot;</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;ttl&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">  &quot;data&quot;</span><span style="color:#D4D4D4;">: {</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;timestamp&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1723899823</span><span style="color:#D4D4D4;">,</span></span>
<span class="line"><span style="color:#9CDCFE;">    &quot;microtime&quot;</span><span style="color:#D4D4D4;">: </span><span style="color:#B5CEA8;">1723899823683</span></span>
<span class="line"><span style="color:#D4D4D4;">  }</span></span>
<span class="line"><span style="color:#D4D4D4;">}</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div></details><h2 id="获取服务器端utc时间" tabindex="-1"><a class="header-anchor" href="#获取服务器端utc时间"><span>获取服务器端UTC时间</span></a></h2><blockquote><p>https://interface.bilibili.com/serverdate.js</p></blockquote><p><em>请求方式：GET</em></p><p><strong>js回复：</strong></p><div class="language-js line-numbers-mode" data-highlighter="shiki" data-ext="js" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-js"><span class="line"><span style="color:#9CDCFE;">window</span><span style="color:#D4D4D4;">.</span><span style="color:#9CDCFE;">serverdate</span><span style="color:#D4D4D4;"> = </span><span style="color:#9CDCFE;">Date</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">UTC</span><span style="color:#D4D4D4;">(</span><span style="color:#4FC1FF;">YYYY</span><span style="color:#D4D4D4;">, </span><span style="color:#4FC1FF;">M</span><span style="color:#D4D4D4;">, </span><span style="color:#4FC1FF;">D</span><span style="color:#D4D4D4;">, </span><span style="color:#9CDCFE;">h</span><span style="color:#D4D4D4;">, </span><span style="color:#9CDCFE;">m</span><span style="color:#D4D4D4;">, </span><span style="color:#9CDCFE;">s</span><span style="color:#D4D4D4;">);</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div></div></div><p><strong>示例：</strong></p><div class="language-shell line-numbers-mode" data-highlighter="shiki" data-ext="shell" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-shell"><span class="line"><span style="color:#DCDCAA;">curl</span><span style="color:#CE9178;"> &#39;https://interface.bilibili.com/serverdate.js&#39;</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div></div></div><details><summary>查看响应示例：</summary><div class="language-js line-numbers-mode" data-highlighter="shiki" data-ext="js" style="background-color:#1E1E1E;color:#D4D4D4;"><pre class="shiki dark-plus vp-code"><code class="language-js"><span class="line"><span style="color:#9CDCFE;">window</span><span style="color:#D4D4D4;">.</span><span style="color:#9CDCFE;">serverdate</span><span style="color:#D4D4D4;"> = </span><span style="color:#9CDCFE;">Date</span><span style="color:#D4D4D4;">.</span><span style="color:#DCDCAA;">UTC</span><span style="color:#D4D4D4;">(</span><span style="color:#B5CEA8;">2021</span><span style="color:#D4D4D4;">, </span><span style="color:#B5CEA8;">4</span><span style="color:#D4D4D4;">, </span><span style="color:#B5CEA8;">16</span><span style="color:#D4D4D4;">, </span><span style="color:#B5CEA8;">17</span><span style="color:#D4D4D4;">, </span><span style="color:#B5CEA8;">31</span><span style="color:#D4D4D4;">, </span><span style="color:#B5CEA8;">8</span><span style="color:#D4D4D4;">);</span></span></code></pre><div class="line-numbers" aria-hidden="true" style="counter-reset:line-number 0;"><div class="line-number"></div></div></div></details>`,31)]))}const p=a(n,[["render",o]]),c=JSON.parse('{"path":"/docs/misc/time_stamp.html","title":"获取当前时间戳","lang":"zh-CN","frontmatter":{},"git":{"updatedTime":1724238159000,"contributors":[{"name":"SocialSisterYi","username":"SocialSisterYi","email":"1440239038@qq.com","commits":3,"url":"https://github.com/SocialSisterYi"},{"name":"SessionHu","username":"SessionHu","email":"102411014+SessionHu@users.noreply.github.com","commits":3,"url":"https://github.com/SessionHu"}],"changelog":[{"hash":"60a0c5d1a2f44fe61335da04571305fa7727a968","time":1724238159000,"email":"102411014+SessionHu@users.noreply.github.com","author":"Session小胡","message":"feat: 各种接口补充与错误修正 (#1066)"},{"hash":"18c1efbc102ae6b44c8f5314c90e5e64f0d926cd","time":1721909032000,"email":"102411014+SessionHu@users.noreply.github.com","author":"Session小胡","message":"feat: bili_ticket 算法 Java 实现 及 信息补充 及 错误修正 (#1061)"},{"hash":"750dd6a924cbeff0c87e9db36d48f4c9fdd3e571","time":1721471929000,"email":"102411014+SessionHu@users.noreply.github.com","author":"Session小胡","message":"feat: 更新部分接口 (#1056)"},{"hash":"05ac3d5e2a9e28be3bf129ae8c78ffdbebaa161c","time":1684805901000,"email":"1440239038@qq.com","author":"SocialSisterYi","message":"添加文档【Wbi 接口签名】，修改目录结构"},{"hash":"f6760f4be38d5b592d396b211e48c666286524de","time":1677124138000,"email":"1440239038@qq.com","author":"SocialSisterYi","message":"🔨remove header index"},{"hash":"7d89ece2ac46425810647c4ac92acf5f3721cb68","time":1676998806000,"email":"1440239038@qq.com","author":"SocialSisterYi","message":"🚀调整项目结构"}]},"filePathRelative":"docs/misc/time_stamp.md"}');export{p as comp,c as data};
