mktime returns -1 but I'm expecting my tm struct to be valid
<pre><code>timeStruct  @0x13b123b0 tm
    tm_hour     0   int
    tm_isdst    0   int
    tm_mday     1   int
    tm_min      0   int
    tm_mon      0   int
    tm_sec      33  int
    tm_wday     4   int
    tm_yday     0   int
    tm_year     70  int
</code></pre>

<p>This is my struct as represented by QTcreators memory watch.</p>

<p>with this as parameter to a call of <code>mktime()</code></p>

<pre><code>struct tm *timeStruct;
//[...]
time_t timeOrigin = mktime(timeStruct);
</code></pre>

<p><code>timeOrigin</code> becomes -1.</p>

<p>There are questions out here asking for the same.</p>

<p>But they all were solved by the hint, that the tm_year field is not years since 1970 but years since 1900. I'm aware of this and also respecting it.</p>

<p>What confuses me further is:</p>

<p>man pages like: <a href="http://linux.die.net/man/3/mktime" rel="nofollow">http://linux.die.net/man/3/mktime</a></p>

<p>explain that mktime doesn't change the structs members if it returns -1. In my case it did adjust in previous cases <code>tm_wday</code> and <code>tm_yday</code>, while returning -1.</p>

<p>I can't find any error regarding this by reading stderr, after mktime returning <code>-1</code> aswell.</p>

<p>So whats going on here?</p>