Hello to all.
How can you translate a number, for example, 1244824 in normal time, the format is чч:мм:сс
. Can somehow take 4 high bits, and do something with them?
Hello to all.
How can you translate a number, for example, 1244824 in normal time, the format is чч:мм:сс
. Can somehow take 4 high bits, and do something with them?
Weird question. "Just a number" has nothing to do with time. 1244824 Are these born racoons from the birth of Christ? Or the number of revolutions of Mars around the sun?
If it is seconds from January 1, 1970 UTC (Received from time ()). You can use strftime. The example given by reference can be converted to receive data in the format hh: mm: ss.
time_t rawtime; struct tm * timeinfo; char buffer [80]; time ( &rawtime ); timeinfo = localtime ( &rawtime ); strftime (buffer,80,"%H:%M:%S.",timeinfo);
Source: https://ru.stackoverflow.com/questions/99545/
All Articles