From aae8368355664f848a0b7abf5523700582626ce7 Mon Sep 17 00:00:00 2001 From: Laurence Luo Date: Tue, 8 Jun 2021 23:19:17 +0800 Subject: [PATCH] Add one more time retrieving api (#193) --- other/time_stamp.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/other/time_stamp.md b/other/time_stamp.md index 24ca0f5..8818750 100644 --- a/other/time_stamp.md +++ b/other/time_stamp.md @@ -1,6 +1,7 @@ # 获取当前时间戳 - [获取当前时间戳](#获取当前时间戳) +- [获取服务器端UTC时间](#获取服务器端UTC时间) --- @@ -48,3 +49,29 @@ curl 'http://api.bilibili.com/x/report/click/now' ``` + +## 获取服务器端UTC时间 + +> https://interface.bilibili.com/serverdate.js + +*请求方式:GET* + +**js回复:** + +```js +window.serverdate = Date.UTC(YYYY, M, D, h, m, s); +``` + +**示例:** + +```shell +curl 'https://interface.bilibili.com/serverdate.js' +``` + + +
+查看响应示例: + +```js +window.serverdate = Date.UTC(2021, 4, 16, 17, 31, 8); +```