Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time filter ignores timezone #495

Closed
antulik opened this issue Feb 15, 2021 · 1 comment
Closed

Time filter ignores timezone #495

antulik opened this issue Feb 15, 2021 · 1 comment
Assignees
Labels

Comments

@antulik
Copy link
Contributor

antulik commented Feb 15, 2021

v4 time parsing ignores timezone and behaves differently to v3.

class TimeInteraction < ActiveInteraction::Base
  time :epoch

  def execute
    epoch
  end
end

Time.use_zone('Perth') do
  TimeInteraction.run!(epoch: '2000-12-11 10:30')
end

Expected: to return time in Perth timezone (same as v3) - 2000-12-11T10:30:00.000+08:00
Actual: returns time in system timezone - 2000-12-11T10:30:00.000+11:00

It that a bug or new behaviour?

@AaronLasseigne
Copy link
Owner

It should definitely respect time zones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants