TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Is Hacker News API returning wrong “time”?

14 点作者 Elect2超过 5 年前
Example:<p>https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=21268584 it shows &quot;4 hour ago&quot;(by time I posted this question)<p>API: https:&#x2F;&#x2F;hacker-news.firebaseio.com&#x2F;v0&#x2F;item&#x2F;21268584.json unix time:1571218522, and it is 3 days ago.

5 条评论

dang超过 5 年前
<a href="https:&#x2F;&#x2F;hn.algolia.com&#x2F;?dateRange=all&amp;page=0&amp;prefix=false&amp;query=by%3Adang%20timestamps&amp;sort=byDate&amp;type=comment" rel="nofollow">https:&#x2F;&#x2F;hn.algolia.com&#x2F;?dateRange=all&amp;page=0&amp;prefix=false&amp;qu...</a>
minimaxir超过 5 年前
The way moderator post repromoting via the second-chance pool works will cause such a discrepancy in the API.<p>It is not ideal.
评论 #21299071 未加载
Elect2超过 5 年前
Recently developing a tool and I found this happed very common.<p>You can see <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=21268584" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=21268584</a> is &quot;5 hours ago&quot;, but from my tool(<a href="https:&#x2F;&#x2F;hn.okphp.com&#x2F;?k=digital,postgres" rel="nofollow">https:&#x2F;&#x2F;hn.okphp.com&#x2F;?k=digital,postgres</a> ) it is &quot;3 days ago&quot;(my tool is using official api timestamp)
评论 #21298892 未加载
yamrzou超过 5 年前
I dont understand why the item page shows “5 hours ago”, but if you filter by domain : <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;from?site=sivers.org" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;from?site=sivers.org</a>, the same item is labeled “3 days ago”, so the API is rather correct. Maybe the timestamp shown on the item page is incorrect, or that the url was re-submitted?
评论 #21298848 未加载
weinzierl超过 5 年前
I noticed that when one of my posts is resubmitted (via second-chance pool) it seems to appear with the time of the resubmit and not the time I posted it originally. I observed this on the website, I never checked the API and maybe this is unrelated to the original question from above. It may even be intentional but probably not many posters know about it.