我正在尝试找到一种方法,让我可以告诉 ransack 在涉及日期或日期范围的查询中使用特定时区。例如,ransack 默认使用 UTC 进行日期时间搜索,我想使用 PST 时区执行查询,我该怎么做?有任何黑客或配置吗?以下是生成的示例查询。
SELECT DISTINCT "orders".* FROM "orders" LEFT OUTER JOIN "customers" ON "customers"."id" = "orders"."customer_id" LEFT OUTER JOIN "payments" ON "payments"."order_id" = "orders "."id" 左外连接 "order_lines" ON "order_lines"."order_id" = "orders"."id" WHERE "orders"."test_transaction" = 'f' AND (("orders"."created_at" > = '2012-11-03 07:00:00.000000' AND "orders"."created_at" <= '2012-11-05 06:59:59.000000'))
谢谢