I am developing a cross-platform application that changes the system date and time to a specified value. I have completed the part for Windows.
How to set system date and time from program C++to Linux? I am looking for a function similar to SetSystemTime(SYSTEMTIME &x).
As far as I understand, settimeofday()it does nothing with the date, and I'm not sure about the use of the function stime(). Hope that mktime()has nothing to do with my need.
Can anybody help me.
source
share