title: How to get timezone abbreviation under Windows
body: <p>We are trying to get the timezone from <code>std::tm</code> with <a href="http://www.cplusplus.com/reference/ctime/strftime/" rel="nofollow noreferrer"><code>strftime</code></a>: </p>
  
  <pre><code>char timezone[50];
  strftime(timezone, sizeof(timezone), "%Z", &amp;timeCreated);
  </code></pre>
  
  <p>On iOS, we get "EST" which is what we want. But on Windows, we get "Eastern Summer Time". Anybody know how to consistently get the current timezone in C++ in abbreviation form? </p>
  
  <p>I consider making the abbreviation from the full name of the timezone by simply picking out the first character in each word. But I check the list of <a href="https://en.wikipedia.org/wiki/List_of_time_zone_abbreviations" rel="nofollow noreferrer">abbreviations</a> and notice that we could have timezone like this one "Chuuk Time" and abbreviated as "CHUT". Which makes manually adjusting not possible. </p>
  
  <hr>
  
  <p>Not the same as Question: <a href="https://stackoverflow.com/questions/5802753/windows-timezone-and-their-abbreviations">Windows Timezone and their abbreviations?</a> I don't need a full list of all timezones and abbreviations. But instead, I need a systematic way to the current timezone using for example <code>strftime</code>. I want them to use the system's current timezone and the the current local. </p>