Settings

Theme

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

14 points by Elect2 6 years ago · 8 comments · 1 min read


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.

dang 6 years ago

https://hn.algolia.com/?dateRange=all&page=0&prefix=false&qu...

minimaxir 6 years ago

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

It is not ideal.

Elect2OP 6 years ago

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)

  • Elect2OP 6 years ago

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

yamrzou 6 years ago

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?

  • Eldt 6 years ago

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

weinzierl 6 years ago

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.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection