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

[Fix #6950] Mark Rails/TimeZone as unsafe #6966

Merged
merged 1 commit into from Apr 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -26,6 +26,7 @@

### Changes

* [#6966](https://github.com/rubocop-hq/rubocop/pull/6966): Mark Rails/TimeZone as unsafe. ([@vfonic][])
* [#5977](https://github.com/rubocop-hq/rubocop/issues/5977): Remove Performance cops. ([@koic][])
* Add auto-correction to `Naming/RescuedExceptionsVariableName`. ([@anthony-robin][])
* [#6903](https://github.com/rubocop-hq/rubocop/issues/6903): Handle variables prefixed with `_` in `Naming/RescuedExceptionsVariableName` cop. ([@anthony-robin][])
Expand Down Expand Up @@ -3960,3 +3961,4 @@
[@diachini]: https://github.com/diachini
[@Mange]: https://github.com/Mange
[@jmanian]: https://github.com/jmanian
[@vfonic]: https://github.com/vfonic
3 changes: 2 additions & 1 deletion config/default.yml
Expand Up @@ -2424,8 +2424,9 @@ Rails/TimeZone:
StyleGuide: 'https://github.com/rubocop-hq/rails-style-guide#time'
Reference: 'http://danilenko.org/2012/7/6/rails_timezones'
Enabled: true
Safe: false
VersionAdded: '0.30'
VersionChanged: '0.33'
VersionChanged: '0.68'
# The value `strict` means that `Time` should be used with `zone`.
# The value `flexible` allows usage of `in_time_zone` instead of `zone`.
EnforcedStyle: flexible
Expand Down
2 changes: 1 addition & 1 deletion manual/cops_rails.md
Expand Up @@ -2185,7 +2185,7 @@ Whitelist | `[]` | Array

Enabled by default | Safe | Supports autocorrection | VersionAdded | VersionChanged
--- | --- | --- | --- | ---
Enabled | Yes | Yes | 0.30 | 0.33
Enabled | No | Yes | 0.30 | 0.68

This cop checks for the use of Time methods without zone.

Expand Down