4 ms·
Ask HN: 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.
- yamrzou 7y agoI 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 7y agoI think there are posts that are automatically reposted according to some algorithm - could this be such a post?
- Elect2 7y agoRecently 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 7y agoI guess it is caused by re-posting. But the api returns the "time" the link first posted.
- minimaxir 7y agoThe way moderator post repromoting via the second-chance pool works will cause such a discrepancy in the API. It is not ideal.
- jey 7y agoMore info: https://github.com/minimaxir/hacker-news-undocumented/blob/master/README.md#second-chance-pool https://github.com/minimaxir/hacker-news-undocumented/blob/m...
- weinzierl 7y agoI 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.
- dang 7y agohttps://hn.algolia.com/?dateRange=all&page=0&prefix=false&query=by%3Adang%20timestamps&sort=byDate&type=comment https://hn.algolia.com/?dateRange=all&page=0&prefix=false&qu...