Hacker News new | ask | show | jobs
by jlu 1211 days ago
Can you paste code on how #2 was done?
1 comments

Time stamp % 24
That does not get you hourly time slots.

You either want something like

    floor(timestamp / 3600)
or

    timestamp - timestamp % 3600
that's clever, thanks!