-
-
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
Time.current.strftime should not be an offense #2026
Comments
I confirmed the reported behavior in the latest master just now. I like to use |
The docs say that if Time.zone or config.time_zone are not set it just returns Time.now. |
//cc @palkan I've never received more issue reports than about this cop. Seems there's no good way to check for the time zone problems reliably, so I guess we should just disable it by default. |
@bbatsov Maybe you're right. Too much edge cases. But nevertheless I'll add support for |
Yep, you should. |
[Fix #2026] Allow `Time.current` when style is 'acceptable'
On code
at rubocop version
I'm getting
But I don't want to have a Time object (as returned by
in_time_zone
), I only want my formatted string and I'm using current to set the right timezone.The text was updated successfully, but these errors were encountered: