user3940: How can I calculate when the policy is going to be locked? I have the policy script file and I need to specify the before slot but I don't know how to calculate it.
For example, I want the policy to be locked in 6 months.

user28: Given the slot lenght is one second, this is pretty easy.

Find the current slot number.

$ curl -s  -H "project_id: $BLOCKFROST_PROJECT_ID" https://cardano-mainnet.blockfrost.io/api/v0/blocks/latest | jq .slot
40664369


Add 6 months to it (roughly)

$ expr 40664369 + $((60*60*24*30*6))
56216369


3940: <p>How can I calculate when the policy is going to be locked? I have the policy script file and I need to specify the <code>before</code> slot but I don't know how to calculate it.</p>
<p>For example, I want the policy to be locked in 6 months.</p>
 28: <p>Given the slot lenght is one second, this is pretty easy.</p>
<ol>
<li>Find the current slot number.</li>
</ol>
<pre><code>$ curl -s  -H &quot;project_id: $BLOCKFROST_PROJECT_ID&quot; https://cardano-mainnet.blockfrost.io/api/v0/blocks/latest | jq .slot
40664369
</code></pre>
<ol start="2">
<li>Add 6 months to it (roughly)</li>
</ol>
<pre><code>$ expr 40664369 + $((60*60*24*30*6))
56216369
</code></pre>
