0
私のpostgresクエリでタイムゾーンを自動的に計算しようとしています。私の目標は、0時から23時59分(ESTまたはUTC - 5:00)のレコードを選択することです。postgresクエリのタイムゾーンの計算
現在のクエリでは、UTC時刻の0時から23時59分までのレコードしか返しません。デフォルトではtimestamp without timezone
SELECT pg_typeof("start_time") from routes limit 1;
戻っUTCであるので
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
列start_time
は1つが5時間差を考慮してクエリを記述して変換する方法を、タイムゾーンなしのタイムスタンプですstart_time
〜UTC - 5?
これはPostgresのです –