calculate the expiration at creation