-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Wrong Time.zone suggestion #1773
Comments
//cc @palkan |
palkan
added a commit
to palkan/rubocop
that referenced
this issue
Apr 9, 2015
There was a kind of typo: we should detect incorrect usage of PR attached. |
palkan
added a commit
to palkan/rubocop
that referenced
this issue
Apr 9, 2015
bbatsov
added a commit
that referenced
this issue
Apr 9, 2015
[Fix #1773] Fix typo ('strptime' to 'strftime')
crimsonknave
pushed a commit
to crimsonknave/rubocop
that referenced
this issue
Apr 13, 2015
8 tasks
8 tasks
koic
added a commit
to koic/rubocop
that referenced
this issue
Jan 5, 2018
Follow up of rubocop#5381 (comment). It seems that there is a mistake in solving the Issue below. rubocop#1773 From Rails 4.2 to Rails 5.2 (beta), The following code will result in an error. ```console > str = '2015-03-02 19:05:37' > Time.zone.strftime(str, "%Y-%m-%d %H:%M%Z") NoMethodError: undefined method `strftime' for #<ActiveSupport::TimeZone:0x00007fdaed438c88> ``` AFIAK, `ActiveSupport::TimeZone#strftime` does not exist in Rails 4.2 at least. Previously, rubocop#1773 was thought to mistype `Time.zone.strftime` to `Time.zone.strptime`. However, I think that it was false positives because `ActiveSupport::TimeZone#strptime` introduced in Rails 5.0 does not exist in Rails 4.2. rails/rails@a5e507f In this PR, `ActiveSupport::TimeZone#strftime` which does not exist is removed from detection targets. I'm judging that this change has no effect on codes that works as expected.
bbatsov
pushed a commit
that referenced
this issue
Jan 5, 2018
Follow up of #5381 (comment). It seems that there is a mistake in solving the Issue below. #1773 From Rails 4.2 to Rails 5.2 (beta), The following code will result in an error. ```console > str = '2015-03-02 19:05:37' > Time.zone.strftime(str, "%Y-%m-%d %H:%M%Z") NoMethodError: undefined method `strftime' for #<ActiveSupport::TimeZone:0x00007fdaed438c88> ``` AFIAK, `ActiveSupport::TimeZone#strftime` does not exist in Rails 4.2 at least. Previously, #1773 was thought to mistype `Time.zone.strftime` to `Time.zone.strptime`. However, I think that it was false positives because `ActiveSupport::TimeZone#strptime` introduced in Rails 5.0 does not exist in Rails 4.2. rails/rails@a5e507f In this PR, `ActiveSupport::TimeZone#strftime` which does not exist is removed from detection targets. I'm judging that this change has no effect on codes that works as expected.
koic
added a commit
to rubocop/rubocop-rails
that referenced
this issue
Oct 26, 2018
Follow up of rubocop/rubocop#5381 (comment). It seems that there is a mistake in solving the Issue below. rubocop/rubocop#1773 From Rails 4.2 to Rails 5.2 (beta), The following code will result in an error. ```console > str = '2015-03-02 19:05:37' > Time.zone.strftime(str, "%Y-%m-%d %H:%M%Z") NoMethodError: undefined method `strftime' for #<ActiveSupport::TimeZone:0x00007fdaed438c88> ``` AFIAK, `ActiveSupport::TimeZone#strftime` does not exist in Rails 4.2 at least. Previously, #1773 was thought to mistype `Time.zone.strftime` to `Time.zone.strptime`. However, I think that it was false positives because `ActiveSupport::TimeZone#strptime` introduced in Rails 5.0 does not exist in Rails 4.2. rails/rails@a5e507f In this PR, `ActiveSupport::TimeZone#strftime` which does not exist is removed from detection targets. I'm judging that this change has no effect on codes that works as expected.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For this code
I get this message
but Time.zone.strptime doesn't exist....
rubocop 0.30.0
rails 4.2.1
Regards
The text was updated successfully, but these errors were encountered: