
Ask HN: Is Hacker News API returning wrong “time”? - Elect2
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.
======
dang
[https://hn.algolia.com/?dateRange=all&page=0&prefix=false&qu...](https://hn.algolia.com/?dateRange=all&page=0&prefix=false&query=by%3Adang%20timestamps&sort=byDate&type=comment)

------
minimaxir
The way moderator post repromoting via the second-chance pool works will cause
such a discrepancy in the API.

It is not ideal.

~~~
jey
More info: [https://github.com/minimaxir/hacker-news-
undocumented/blob/m...](https://github.com/minimaxir/hacker-news-
undocumented/blob/master/README.md#second-chance-pool)

------
Elect2
Recently developing a tool and I found this happed very common.

You can see
[https://news.ycombinator.com/item?id=21268584](https://news.ycombinator.com/item?id=21268584)
is "5 hours ago", but from my
tool([https://hn.okphp.com/?k=digital,postgres](https://hn.okphp.com/?k=digital,postgres)
) it is "3 days ago"(my tool is using official api timestamp)

~~~
Elect2
I guess it is caused by re-posting. But the api returns the "time" the link
first posted.

------
yamrzou
I dont understand why the item page shows “5 hours ago”, but if you filter by
domain :
[https://news.ycombinator.com/from?site=sivers.org](https://news.ycombinator.com/from?site=sivers.org),
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?

~~~
Eldt
I think there are posts that are automatically reposted according to some
algorithm - could this be such a post?

------
weinzierl
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.

