Fix up time handling