Skip to content

Commit

Permalink
[Fix #6950] Mark Rails/TimeZone as unsafe
Browse files Browse the repository at this point in the history
  • Loading branch information
vfonic committed Apr 25, 2019
1 parent 478b369 commit b58cdad
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
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

0 comments on commit b58cdad

Please sign in to comment.