File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -57,14 +57,14 @@ language-script-region-variant-extension-privateuse
5757
5858### 时区
5959
60- 客户端请求服务器时,如果对时间有特殊要求(如某段时间每天的统计信息),则可以参考 [ IETF 相关草案] ( http://tools.ietf.org/html/draft-sharhalakis-httptz-05 ) 增加请求头 ` Timezone: Asia/Shanghai ` ,或者现在可能更常见的请求头( GitHub 使用的) ` Time-Zone: Asia/Shanghai ` 。
60+ 客户端请求服务器时,如果对时间有特殊要求(如某段时间每天的统计信息),则可以参考 [ IETF 相关草案] ( http://tools.ietf.org/html/draft-sharhalakis-httptz-05 ) 增加请求头 ` Timezone: Asia/Shanghai ` 。
6161
6262时区的名称可以参考 [ tz datebase] ( https://en.wikipedia.org/wiki/List_of_tz_database_time_zones ) 。
6363
64- 考虑到维护这样一份列表可能会产生一定的困扰,因此也可以使用请求头 ` Time-Offset: +0800 ` 来替代([ 来源] ( http://blogs.windwardreports.com/davidt/2010/04/can-we-please-get-a-time-zone-in-the-http-request-header.html?cid=6a0115711bf0ae970b01347fd28db8970c#comment-6a0115711bf0ae970b01347fd28db8970c-content ) )
65-
6664如果客户端请求时没有指定相应的时区,则服务端默认使用 [ UTC] ( http://zh.wikipedia.org/wiki/%E5%8D%8F%E8%B0%83%E4%B8%96%E7%95%8C%E6%97%B6 ) 时间返回相应数据。
6765
66+ PS 考虑到存在[ 夏时制] ( https://en.wikipedia.org/wiki/Daylight_saving_time ) 这种东西,所以不推荐客户端在请求时使用 Offset 。
67+
6868### 时间格式
6969
7070时间格式遵循 [ ISO 8601] ( https://en.wikipedia.org/wiki/ISO_8601 ) 建议的格式:
@@ -405,4 +405,3 @@ foo({
405405 还是不建议将动作写在 URL 中,像文档中的情况,可以将这个行为抽象成一个事务资源 ` POST /runs/:run_id/stop-logs ` 或者 ` POST /runs/:run_id/stoppers ` 来解决
406406* [ Paginate with Ranges] ( https://github.com/interagent/http-api-design/#paginate-with-ranges )
407407 确实是一个巧妙的设计,但似乎并不符合 ` Content-Range ` 的设计意图,而且有可能和需要使用到 ` Content-Range ` 的正常场景冲突(虽然几乎不可能),所以不推荐
408-
You can’t perform that action at this time.
0 commit comments