<p>I am now working in the migration from helm 2 to 3.</p>
<p>I am using the value of <code>.Release.time.Seconds</code> in my charts. I have seen that in helm 3 <code>.Release.time</code> does not exists. Trying to use <code>now</code> as it is explained in this <a href="https://stackoverflow.com/questions/61140638/alternative-for-release-time-in-helm-v3">stackoverflow question</a>, I can do the instalation, but I do not get the expected value.</p>
<p>For example, with the following code:</p>
<pre><code> template:
    metadata:
      labels:
        dateInSeconds: &quot;{{ .Release.Time.Seconds }}&quot; 
</code></pre>
<p>The label gets the value <code>dateInSeconds: 1611923156</code></p>
<p>If I use the <code>now</code> function:</p>
<pre><code> template:
    metadata:
      labels:
        dateInSeconds: {{ now | quote }}  
</code></pre>
<p>The label gets the value <code>dateInSeconds: &quot;2021-02-01 12:05:28.6116854 +0100 CET m=+2.394553701&quot;</code></p>

pcampana
<p>I have found the solution in <a href="http://masterminds.github.io/sprig/date.html" rel="noreferrer">sprig</a>. For getting the epoch time I can use <code>unixEpoch</code>.</p>
<p>So the solution is:</p>
<pre><code>template:
    metadata:
      labels:
        dateInSeconds: {{ now | unixEpoch | quote}}   
</code></pre>
