HACKER Q&A
📣 Elect2

Is Hacker News API returning wrong “time”?


Example:

https://news.ycombinator.com/item?id=21268584 it shows "4 hour ago"(by time I posted this question)

API: https://hacker-news.firebaseio.com/v0/item/21268584.json unix time:1571218522, and it is 3 days ago.



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

It is not ideal.


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

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


👤 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, 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?

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