Use Date.current and Time.current

Using Date.today and Time.now might lead to inconsistencies if the time
zone the application uses is not the same as the system time zone.
This commit is contained in:
Javi Martín
2019-06-18 01:15:06 +02:00
parent 158f59ce0d
commit a21240b230
20 changed files with 34 additions and 34 deletions

View File

@@ -96,7 +96,7 @@ class Proposal < ApplicationRecord
end
def publish
update(published_at: Time.now)
update(published_at: Time.current)
send_new_actions_notification_on_published
end