Skip to content

Commit a106a20

Browse files
committed
Update line numbers
1 parent fd85325 commit a106a20

File tree

1 file changed

+3
-4
lines changed
  • 2020/07/08/jmeter-timestamp-to-date-time

1 file changed

+3
-4
lines changed

2020/07/08/jmeter-timestamp-to-date-time/index.html

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,20 +120,19 @@ <h2 id="java">Java</h2>
120120
</div><p>The <a href="https://github.com/Tigraine/go-timemilli">go-timemilli</a> module will do this for you with a slight performance improvement.</p>
121121
<h2 id="excel">Excel</h2>
122122
<p>This is the fun one&hellip;</p>
123-
<pre><code class="language-{linenos=table}" data-lang="{linenos=table}">Milliseconds in a day = 86400000 milliseconds
123+
<pre><code>Milliseconds in a day = 86400000 milliseconds
124124
Unix epoch = DATE(1970,1,1) = 25569 milliseconds
125125
</code></pre><p>So to convert the timestamp we need to:</p>
126-
<pre><code class="language-{linenos=table}" data-lang="{linenos=table}">=(timestamp / 86400000) + 25569 = 07/07/2020 07:58:41.012
126+
<pre><code>=(timestamp / 86400000) + 25569 = 07/07/2020 07:58:41.012
127127
</code></pre><p>To display the date time correctly you need to set the format of the calculation field to be a custom format of: <code>dd/mm/yyyy hh:mm:ss.000</code></p>
128128
<p>This though does not take local time into account. To include local time we must add the number of hours (in milliseconds) to the time stamp:</p>
129-
<pre><code class="language-{linenos=table}" data-lang="{linenos=table}">Milliseconds in an hour = 3600000
129+
<pre><code>Milliseconds in an hour = 3600000
130130

131131
=((timestamp + (TimezoneOffset * 3600000)) / 86400000) + 25569
132132

133133
eg. British Summer time (UTC+1h)
134134

135135
=((timestamp + (1 * 3600000)) / 86400000) + 25569 = 07/07/2020 08:58:41.012
136-
137136
</code></pre>
138137
</div>
139138

0 commit comments

Comments
 (0)