We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Similar to #440, we are often use this construct in tests :
Time.parse("2022-10-30 00:00:00 CEST +02:00")
It's especially usefull for explicit summer/winter time :
Time.parse("2022-10-30 00:00:00 CEST +02:00") => 2022-10-30 00:00:00 +0200 Time.parse("2022-10-31 00:00:00 CET +01:00") => 2022-10-31 00:00:00 +0100
If detecting zones abbreviations might be too overwhelming, the cop should be able to detect and allow time offsets from UTC.
Similar to #441 :
- TIMEZONE_SPECIFIER = /[A-z]/.freeze + TIMEZONE_SPECIFIER = /([A-z]|[+-]\d{2}:\d{2})\Z/.freeze def attach_timezone_specifier?(date) - date.respond_to?(:value) && TIMEZONE_SPECIFIER.match?(date.value.to_s[-1]) + date.respond_to?(:value) && TIMEZONE_SPECIFIER.match?(date.value.to_s) end
The text was updated successfully, but these errors were encountered:
[Fix rubocop#800] Make Rails/TimeZone aware of timezone offset
c53a87c
9ade354
Rails/TimeZone
24848eb
8fedb3f
Merge pull request #801 from inkstak/make_rails_time_zone_aware_of_ti…
7220b5c
…mezone_offset [Fix #800] Make `Rails/TimeZone` aware of timezone offset
Successfully merging a pull request may close this issue.
Is your feature request related to a problem? Please describe.
Similar to #440, we are often use this construct in tests :
It's especially usefull for explicit summer/winter time :
Describe the solution you'd like
If detecting zones abbreviations might be too overwhelming, the cop should be able to detect and allow time offsets from UTC.
Similar to #441 :
The text was updated successfully, but these errors were encountered: