Fix test failures due to repeated calls to get the current time