How do you convert between a DateTime and a Time object in Ruby?
While making such conversions one should take into consideration the behavior of timezones while converting from one object to the other. I found some good notes and examples in this stackoverflow post.