title: using thread safe local_time_r
body: <p>I have the following c code, I would like to use the local_time_r which is thread safe, I get Segmentation fault, I don't know why.</p>
  
  <pre><code>time_t rawtime = 1441194527;
     struct tm *info;
     char buffer[80];
  
     time( &amp;rawtime );
  
     info = localtime_r( &amp;rawtime );
  
     strftime(buffer,80,"%Y-%m-%d %X", info);
     printf("Formatted date &amp; time : |%s|\n", buffer );
  </code></pre>