简体   繁体   中英

time.h library default functions C++

i was wonder if the localtime() function work on Linux? i though there is another command for that but i cant remember it now

apparently my assignment have to work on linux or it doesn't count for marks and my parents does not know how to use it

According to this localtime() should work perfectly fine with Linux.

From the linked:

    #include <time.h>
    //...
    struct tm *localtime(const time_t *timep);
    struct tm *localtime_r(const time_t *timep, struct tm *result);

If that declaration is the same localtime() that you're asking about (and I assume it is) then you should be just fine using it on Linux based machines.

Yes localtime() function works on Linux. Check the reference here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM