mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-04 16:28:50 +01:00
Fix a date-based issue in the project tests
Due to time zone issues, this test was failing for me because it was attempting to compare a date in my local time zone with a UTC date.
This commit is contained in:
parent
07a983ca1c
commit
6c695aa61a
1 changed files with 1 additions and 1 deletions
|
|
@ -134,7 +134,7 @@ class Project < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def age_in_days
|
||||
@age_in_days ||= (Date.today - created_at.to_date + 1).to_i
|
||||
@age_in_days ||= ((Time.now.utc - created_at).to_i / 1.day) + 1
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue