title: new version of glibc returns wrong timezone
body: <p>This SO thread <a href="https://stackoverflow.com/questions/635780/why-does-glibc-timezone-global-not-agree-with-system-time-on-dst">Why does glibc “timezone” global not agree with system time on DST?</a> is not a solution for my problem.</p>
  
  <p>My system has <code>glibc 2.11.3</code> and for my project I compiled <code>glibc 2.22</code>. I ran <code>make localedata/install-locales</code>.</p>
  
  <p>This MCVE displays the correct time only when linked against the old <code>glibc</code> version. Linking it against the new <code>glibc</code> version it displays the UTC time:</p>
  
  <pre><code>#include &lt;time.h&gt;
  #include &lt;stdio.h&gt;
  
  int main()
  {
      struct tm * tmNow;
      time_t dtNow;
      char sBuffer [100];
  
      tzset();
  
      time( &amp;dtNow );
      tmNow = localtime( &amp;dtNow );
  
      strftime( sBuffer, sizeof(sBuffer), "%Y-%m-%d %T", tmNow );
      printf("%ld - %s\n", timezone, sBuffer);
  }
  </code></pre>
  
  <p>When I try to run <code>tzselect</code> in the <code>bin/</code> directory of the new <code>glibc</code> version I get this error:</p>
  
  <pre><code>./tzselect: line 171: /usr/glibc/share/zoneinfo/iso3166.tab: No such file or directory
  ./tzselect: time zone files are not set up correctly
  </code></pre>
  
  <p>More or less it says all but for the moment I am not capable to find out how to set up the file <code>/usr/glibc/share/zoneinfo/iso3166.tab</code>.</p>
  
  <p>How do I set up the timezone for the <strong>new</strong> <code>glibc</code> version permanently?</p>
  
  <p><strong>I do not want to use the TZ variable</strong>!</p>
  
  <p><strong>UPDATE</strong>:
  Using the <code>TZ</code> variable does not change anything. I guess I did not configure correctly the new <code>glibc</code> version.</p>
  
  <p><strong>UPDATE</strong>: Copying the existing <code>/usr/share/zoneinfo</code> system directory into the new <code>/usr/glibc/share/zoneinfo</code> directory at least fixed the problem with the <code>TZ</code> variable. But as long the <code>TZ</code> variable is not set the new <code>glibc</code> version does not recognize the correct timezone.</p>