mirror of
https://github.com/switchbrew/switch-examples.git
synced 2025-06-21 13:22:40 +02:00
Updated localtime comment in the time example.
This commit is contained in:
parent
5c2187ca44
commit
4c0e6cf201
@ -28,7 +28,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
//Print current time
|
//Print current time
|
||||||
time_t unixTime = time(NULL);
|
time_t unixTime = time(NULL);
|
||||||
struct tm* timeStruct = gmtime((const time_t *)&unixTime);//Gets UTC time. Currently localtime() will also return UTC (timezones not supported).
|
struct tm* timeStruct = gmtime((const time_t *)&unixTime);//Gets UTC time. If you want local-time use localtime().
|
||||||
|
|
||||||
int hours = timeStruct->tm_hour;
|
int hours = timeStruct->tm_hour;
|
||||||
int minutes = timeStruct->tm_min;
|
int minutes = timeStruct->tm_min;
|
||||||
|
Loading…
Reference in New Issue
Block a user