Hacker News new | ask | show | jobs
by joneholland 1212 days ago
Time stamp % 24
2 comments

That does not get you hourly time slots.

You either want something like

    floor(timestamp / 3600)
or

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