Why is it that _localtime32 and _gmtime32 return the same time value for a non-GMT time zone? <p>My time zone is set to <code>CDT</code> in the control panel Date/Time applet.</p> <p>The following code places exactly the same date and time into <code>pCurGmtTime</code> and <code>pCurTime</code>:</p> <pre><code>int main(int argc, char *argv[]) { __time32_t t=_time32(NULL); tm *pCurGmtTime=_gmtime32(&amp;t); tm *pCurTime=_localtime32(&amp;t); // The values in the *pCurGmtTime structure are equal to the values in *pCurTime return 0; } </code></pre> <p>I don't have the <code>TZ</code> environment variable set, but my time zone is properly configured for the system via the Control Panel Date and Time applet. This behavior seems to go against the MSDN documentation for these functions, which says that <code>TZ</code> overrides the control panel settings, but if it is absent the control panel settings will be used.</p> <p>Thanks</p>