title: Set System date and time using C++ in Linux
body: <p>I am in the middle of developing a cross platform application that changes the system date and time to a specified value. I have completed the part for <code>Windows</code>. </p>
  
  <p>How can I set the system date and time from a <code>C++</code> program in <code>Linux</code>? I am looking for a function similar to <code>SetSystemTime(SYSTEMTIME &amp;x)</code>.</p>
  
  <p>As far as I understood <code>settimeofday()</code> does nothing with the date and I am not sure about the usage of function <code>stime()</code>. I hope <code>mktime()</code> has nothing to do with my need.</p>
  
  <p>Can anybody help me.</p>