<p>I'm not quite sure why there's no timezone mentioned in my outputs. I've tried various settings (e.g. LANG=de_DE vs LANG=C), but there's never any timezone indicator in the outputs. But this seems to be an issue on my system.</p>

<p>Nevertheless, for the sake of argument, let's assume there's a timezone indicator in the output. As you can see from your outputs, you'll never get the expiration time of <strong>02:00:00 PM CEST</strong> / <strong>14:00:00</strong>, which would be the correct time representation in the case of TZ=Europe/Berlin.</p>

<p>And as you can see in my last patch, the variable TZ is being cleared / unset. Since the check uses "%c" in strftime, the user can still choose his preferred TZ-settings.</p>

<p>At last, I have found a more verbose example:</p>

<h2>current behavior</h2>

<div class="highlight highlight-shell"><pre>TZ=UTC ./check_http -v -p443 -H github.com  -C 7,3 --sni
OK - Certificate <span class="pl-s"><span class="pl-pds">'</span>github.com<span class="pl-pds">'</span></span> will expire on Tue Apr 12 12:00:00 2016.</pre></div>

<div class="highlight highlight-shell"><pre>TZ=PST8PDT ./check_http -v -p443 -H github.com  -C 7,3 --sni
OK - Certificate <span class="pl-s"><span class="pl-pds">'</span>github.com<span class="pl-pds">'</span></span> will expire on Tue Apr 12 13:00:00 2016.</pre></div>

<h2>new behavior</h2>

<div class="highlight highlight-shell"><pre>TZ=PST8PDT ./check_http -v -p443 -H github.com  -C 7,3 --sni
OK - Certificate <span class="pl-s"><span class="pl-pds">'</span>github.com<span class="pl-pds">'</span></span> will expire on Tue Apr 12 05:00:00 2016.</pre></div>

<p>Since PST8PDT is UTC-8, the second output would be correct.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br><a href="https://github.com/monitoring-plugins/monitoring-plugins/pull/1337#issuecomment-95497698">Reply to this email on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AFQl2fiHlAnDs68doIdj7z4gbbZfxaYAks5oCKxWgaJpZM4EGE_1.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
  <div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
    <link itemprop="url" href="https://github.com/monitoring-plugins/monitoring-plugins/pull/1337#issuecomment-95497698"></link>
    <meta itemprop="name" content="View Pull Request"></meta>
  </div>
  <meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>