Fixed duration code to handle duration(0) - represent as PT0S (was 'P') - and enforced with regtest