Hacker News new | ask | show | jobs
Handling dates and times in SQL queries with PostgreSQL (mon-code.net)
3 points by metfan 2 days ago
1 comments

For reports by local date, I’d convert both local midnights to timestamptz separately, then filter with ts >= start AND ts < end. If you take the first midnight and just add 24 hours, you can miss an hour or pull in an hour from the next day when the clocks change