Where does Rails get it's datetime for creating records?

Posted by gwapEs9 on Programmers See other posts from Programmers or by gwapEs9
Published on 2014-06-04T00:43:30Z Indexed on 2014/06/04 3:37 UTC
Read the original article Hit count: 186

Filed under:
|

I have a rails app with a data model called 'jobs' and i'm faced with a critical design choice crossroads.

I don't know enough about Rails and it's inner workings to be able to say for sure what I should do despite a complete read of the rails and ruby docs.

I want to be able to accurately display the age of a job record in days. So when a customer logs in, they can see that the job they submitted is 'x' days old.

Where does a rails app on Heroku get it's time stamps? From Heroku? or the customers system clock?

If a customer has a out of date system clock and submits a job, it could really mess up the sorting of their job list, not to mention me the overseer of job records.

Any advice out there?

EDIT: Just to be clear, i'm not asking how to list jobs by their date, but to which clock does a rails app on Heroku base it's records.

© Programmers or respective owner

Related posts about ruby-on-rails

Related posts about time