Yes, the localtime() function returns a pointer to tm struct.Originally Posted by jamadagni
So the following C code should work:
Qt Code:
time_t now; struct tm * local; int year; time( &now ); local = localtime( &now ); year = local->tm_year;To copy to clipboard, switch view to plain text mode
BTW here is a good reference for the standard C time functions: http://www.cplusplus.com/ref/ctime/
Bookmarks