I’m trying to determine how long a “job” takes.
@job is an instance of the ActiveRecord model.
job_time = (Time.now.utc - @job.created_at.utc)/1.minute
I am using the “created_at” that comes with ActiveRecord.
Since Time.now is not utc and @job.created_at is “UTC” (all caps), I
converted both to utc to get consistent results.
- job_time is in minutes, correct?
- Any issues with computing job_time this way to get minutes?