TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

HTTP API Design

11 pointsby markthethomasalmost 11 years ago

1 comment

pan69almost 11 years ago
This seems to be interesting:<p><pre><code> Use UTC times formatted in ISO8601 Accept and return times in UTC only. Render times in ISO8601 format, e.g.: &quot;finished_at&quot;: &quot;2012-01-01T12:00:00Z&quot; </code></pre> So what if the time zone is important? E.g. the time a user purchased a product. The UTC time is obviously consistent throughout the system but presented without a time zone might not make an awful lot of sense to a user, especially if the time zone is something plus or minus 10 hours.<p>Wouldn&#x27;t an RFC 2822 formatted date make not more sense; &quot;Thu, 21 Dec 2000 16:01:07 +0200&quot;. You still have your UTC but you are now capable to represent the time to a user within a context that makes sense.
评论 #7996898 未加载
评论 #7996887 未加载