mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-03-24 09:43:24 -04:00
Fix intermittent build failure due to timezones
Because our default timezone for the app is UTC, at certain times, some tests could fail outside of UTC. This commit fixes that by changing a single call to Time.now to Time.zone.now.
This commit is contained in:
@@ -9,7 +9,7 @@ class Post < ActiveRecord::Base
|
||||
|
||||
def author_date_subject
|
||||
# slugs are created before created_at is set
|
||||
time = created_at || Time.now
|
||||
time = created_at || Time.zone.now
|
||||
"#{author.login_name} #{time.strftime("%Y%m%d")} #{subject}"
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user