Skip to content

Conversation

@sebastianguarin
Copy link

Time objects are being sent with the initialised timezone instead of DB timezone, leading to query inconsistencies or wrong time offsets.

Ruby

Workflow.where("effective_date <= ?", Time.current).last
SELECT "workflows".* FROM "workflows" WHERE (effective_date <= $1) ORDER BY "workflows"."id" DESC LIMIT $2  [[nil, "2025-09-18 03:11:44.998672"], ["LIMIT", 1]

JRuby

Workflow.where("effective_date <= ?", Time.current).last
Workflow Load (109.1ms)  SELECT "workflows".* FROM "workflows" WHERE (effective_date <= ?) ORDER BY "workflows"."id" DESC LIMIT ?  [[nil, Tue, 09 Sep 2025 15:02:41.133000000 AEST +10:00], ["LIMIT", 1]]

TODO:
Couple log bindings with execution bindings as they are decoupled misleading final queries.

SPEC needed to cover this scenario. however additional specs in the application should be needed to check app behaviour

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant