Time error wrong output
<pre><code>    time_t ltime;
    time( &amp;ltime );
    tm *    pTm = localtime(&amp;ltime);

    printf("%d",pTm-&gt;tm_wday);
</code></pre>

<p>output= 2 , how come while 2day is 8 -.- anyclue?</p>
