The error the IDE shows you is due to a mistake on how you enter the parameters in the system command, the parameter should be entered as char, so, I suggest you to try this instead char* dateCmd = "date +'%Y%m%d %H:%M:%S'";
usually, you would use c_str() to convert your String, but as you stated, it does not exist. Instead, try this:
String dateCmd="date +'%Y%m%d %H:%M:%S' -s "; dateCmd+="'20150120 10:42:00'"; system(dateCmd.buffer);
This compiled and executed for me.
Please note though, that your command seems to contain an error:
root@clanton:~# date +'%Y%m%d %H:%M:%S' -s '20150120 10:42:00' date: invalid date '20150120 10:42:00'
Apart from that, you won't see date's output from the program.
Thanks DomiWag, the buffer method works!
I don't see the date error here, guess I'm using IoT DevKit image, so the datetime format is configurable. From what I see in other threads, the format is fixed in the "official" image, one needs to set the datetime in a specific way.