Skip to content

Conversation

@jaytennier
Copy link
Member

I have no idea why we had that cop disabled but it's long been established best practice to use Time.current or Time.zone... in Rails apps to ensure that everything works regardless of the system time zone. See: https://thoughtbot.com/blog/its-about-time-zones

I recently ran into a bunch of these issues when trying to make the specs in the main app pass locally so I guess now I know how those calls made it in there.

https://www.rubydoc.info/gems/rubocop/0.57.2/RuboCop/Cop/Rails/TimeZone

I have no idea why we had that cop disabled but it's long been
established best practice to use `Time.current` or `Time.zone...` in
Rails apps to ensure that everything works regardless of the system time
zone. See: https://thoughtbot.com/blog/its-about-time-zones

I recently ran into a bunch of these issues when trying to make the
specs in the main app pass locally so I guess now I know how those calls
made it in there.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants