In am trying to automatically account for timezone in my postgres query. My goal is to select records that are between 0:00 and 23:59 in EST or UTC - 5:00.
The current query only returns records between 0:00 and 23:59 in UTC time.
select path, start_time from routes where routes.network_id = 1 and routes.start_time between '2017-06-13 00:00:00'::timestamp AND '2017-06-13 23:59:59'::timestamp
the column start_time is a timestamp without timezone, so by default it is in UTC
SELECT pg_typeof("start_time") from routes limit 1;
returns timestamp without timezone
how would one write a query to account for 5 hours difference and convert start_time to UTC - 5?