fix the arithmetic for determining dst shift