Make the time calculations a bit more sane