This should possibly be on Stack Exchange.
In all the review queues, the times are a bit wrong.
I am posting this close enough to 17:00 BST, so 16:00 UTC. So yesterday was 16 hours ago.
I took this screenshot at 15:52 UTC. In my history, I have 2 reviews, done today at 14:00 and 12:00. (2014-08-12). I also have 2 done at 16:00. Yesterday (2014-08-11)
Then I had another 4 (well, 6 but I cut off 2 from the screenshot) yesterday.
It thinks that 24 hours+ is yesterday, when in reality yesterday is anything since 00:00.
Pseudo code, as I have no idea what code this site uses.
currenttime = 1407859825
latest midnight = 1407801600
if currenttime - timeposted >= 86400:
display: "Yesterday"
else:
display: (currenttime - timeposted)/86400 "hours ago"
It should be:
currenttime = 1407859825
latestmidnight = 1407801600
timesincemidnight = currenttime - latestmidnight
if timeposted - currenttime >= timesincemidnight:
if currenttime - timeposted >= 86400:
display: "Yesterday"
else:
display: "Yesterday ("(currenttime - timeposted)/86400 "hours ago)"
else:
display: (currenttime - timeposted)/86400 "hours ago"
Example for code 1. It is 16:00 (1407859200). I posted at 22:00 (1407794400) yesterday. It would think:
1407859200 (16:00) - 1407794400 (22:00 yesterday) = 64800
64800 >= 86400 == False
and display:
18 hours ago
Example for code 2. It is 16:00 (1407859200). I posted at 22:00 (1407794400) yesterday. Midnight was 00:00 (140780160). It would think:
timesincelastmidnight (tslm) = 1407859200 (16:00) - 1407801600 (00:00) = 57600
1407859200 (16:00) - 1407794400 (22:00 yesterday) = 64800
64800 >= 57600 (tslm) == True
and display:
Yesterday (18 hours ago)
@Mateo pointed out that this has already been commented on before:
"< 48*60*60s" is a rather unconventional definition for "yesterday". If it's 9am on Wednesday, would you really think of 9:01am on Monday as "yesterday". I'd have thought an algorithm for yesterday or "n days ago" should consider before/after midnight. – Joe Feb