I generated my own Task model with completed_on as timestamp. I used timestamp because created_at/updated_at were datetime and I thought that could be the problem. It still works though.
I don't think it really matters if Time.now in console is -0800. As long as your timestamp/datetime objects have time zone information (like the -0800 in Time.now), it should be resolved properly. Setting the model field value to Time.now, and then displaying it using distance_of_time_in_words_to_now helper should be ok (as I've tested). As mentioned by Ryan Bates in the Time Zone screencast, as long as the dates are stored consistently as UTC in the DB, it should work. Perhaps you have old tasks data in your DB with completed_on not stored in UTC? You can also try checking the values of the following in your console (where @task is set to a Task you want to check, perhaps one that doesn't display the proper value): >> @task.completed_on >> @task.completed_on_before_type_cast >> Time.now --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Heroku" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/heroku?hl=en -~----------~----~----~----~------~----~------~--~---
