add time conversions and fix exception include guard