sts10/radiation — pull request #7 by gunnarhafdal (2014-11-23 20:29:34+00:00)
Title: Added a get_timestring to Post.rb so we can get a valid datetime string for a <time> element

I wanted to add a `` element on my blog posts so I made a new method in Post.rb. Since it has to output the right timezone as well I had to change the `get_datetime_object` method so it returned the time in the correct timezone. `Time.parse()` defaults to UTC so if I made a blog post at 5 pm in Europe then `get_datetime_object` would return a time set to 5 pm UTC. What I did is just add the offset between my timezone and UTC back onto the time being returned.

I also added the `` element to the sample blog template because I think it's smart to have the correct time on every post. Might make it easier for things like Hazmat to order posts in the correct chronological order.