<p>The timezone did not meet my expectations When i use <code>kubectl logs &lt;mypod&gt; --timestamps</code> to get the pod log.</p>
<p>current output:</p>
<pre class="lang-bash prettyprint-override"><code>2022-06-15T07:31:41.826543867Z 2022/06/15 15:31:41 [info] Start grpc server listen 58212 port.
2022-06-15T07:31:41.826568525Z 2022/06/15 15:31:41 [info] Start http server listen 10000 port.
</code></pre>
<p>expected output:</p>
<pre class="lang-bash prettyprint-override"><code>2022-06-15T15:31:41+0800 2022/06/15 15:31:41 [info] Start grpc server listen 58212 port.
2022-06-15T15:31:41+0800 2022/06/15 15:31:41 [info] Start http server listen 10000 port.
</code></pre>
<p>What should I set up to achieve this output?</p>

<p><code>kubectl</code> does not support this directly at the time of writing this and it tricky to do this in a portable way. On Linux something like this would work:</p>
<pre><code>kubectl logs --timestamps mypod | while read timestamp line; do \
  echo &quot;$(env TZ=&quot;EST&quot; date -d &quot;$timestamp&quot; '+%Y-%m-%dT%H:%M:%S.%N%:z') $line&quot;; done
</code></pre>
<p>You will get an output like this:</p>
<pre><code>2022-06-08T14:13:41.847615539-05:00 INFO [06-08|19:13:41.847] Starting Geth on Ethereum mainnet...
</code></pre>
