Looking for a way to get the seconds until @post.created_at date time with timezone.
Using DateTime.now.in_time_zone to get the current date and time. I can use the ruby time helpers but I really only need the seconds.
There is distance_of_time_in_words but no distance_of_time_in_seconds helper
- how would you calculate seconds away (left until) a certain @post.created_at?
A simple
..will give you the seconds. You need not have to worry about Time Zones, because Rails will be handling the time zones (since both are objects with time zone details with it), before calculating the difference.