fix Windows log
This commit is contained in:
parent
2255bdf6c7
commit
cc697ab5ac
|
@ -145,10 +145,18 @@ void initLog() {
|
|||
logFileAvail=false;
|
||||
|
||||
time_t curTime=time(NULL);
|
||||
#ifdef _WIN32
|
||||
struct tm* curDay;
|
||||
curDay=localtime(&curTime);
|
||||
if (curDay!=NULL) {
|
||||
dejarteArriba=(curDay->tm_mon==3 && (curDay->tm_mday==1 || curDay->tm_mday==2));
|
||||
}
|
||||
#else
|
||||
struct tm curDay;
|
||||
if (localtime_r(&curTime,&curDay)!=NULL) {
|
||||
dejarteArriba=(curDay.tm_mon==3 && (curDay.tm_mday==1 || curDay.tm_mday==2));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void _logFileThread() {
|
||||
|
|
Loading…
Reference in New Issue