converting time to seconds since midnight because rails stores times as dates