title: Is standard C mktime thread safe on linux?
body: <p>The man page of mktime didn't mention thread safety of mktime, but it did mention this which make it look like thread <strong>unsafe</strong>:</p>
  
  <blockquote>
    <p>Calling mktime() also  sets  the  external variable  tzname  with information about the current time zone.</p>
  </blockquote>
  
  <p>I know on Linux mktime calls tzset to set tzname, which is a char*[]:</p>
  
  <blockquote>
    <p>extern char *tzname[2];</p>
  </blockquote>
  
  <p>and tzset will read environment variable TZ and file /etc/localtime. So unless mktime uses a mutex to protect all these operations, I can't see how it can be thread safe.</p>