dcs mcs time
#2

DratanCastle.cpp

In void CDratanCastle::SetNextWarTime(int nextWarTime)


Quote




    int next = 7 - curtm.tm_wday;   //sunday

    if (next < 0)

        next += 7;




...


Quote




 



    struct tm nexttm = curtm;



    nexttm.tm_hour = 19;   //19:00

    nexttm.tm_min = 0;

    nexttm.tm_sec = 0;

    nexttm.tm_mday += next;

    nexttm.tm_isdst = -1;

    time_t nexttime = mktime(&nexttm);



 




 

-> DCS on Sunday at 19:00



WarCastle_Merac.cpp

In void CMeracCastle::SetNextWarTime(int nextWarTime)


Quote




 



    struct tm curtm = NOW();



    // 다음 토요일을 구함

    int next = 6 - curtm.tm_wday;   //saturday

    if (next <= 0)

        next += 7;



 




...


Quote




 



    struct tm nexttm = curtm;



    nexttm.tm_hour = 19;   //19:00



 




 

-> MCS on Saturday at 19:00

 



Messages In This Thread
[No subject] - by rondo157 - 01-24-2021, 03:04 PM
[No subject] - by Desarija - 01-24-2021, 03:48 PM
[No subject] - by rondo157 - 01-24-2021, 03:49 PM
[No subject] - by cooldude - 01-24-2021, 05:32 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)