```ruby
# frozen_string_literal: true

class Integer
  def to_time
    Time.at(self / 1000)
  end
end
```

Use `Time.zone.at` instead of `Time.at`
user
```ruby
# frozen_string_literal: true

class Integer
  def to_time
    Time.zone.at(self / 1000)
  end
end
```
assistant