Fixed Windows 10 issues

This commit is contained in:
2019-11-27 13:46:45 +01:00
parent ccd2bee54f
commit 04dbd76616
+5 -3
View File
@@ -438,12 +438,14 @@ int my_read(int fh, void *buffer, unsigned int bytes) {
return 0;
}
/* workaround for wong timezone under MAX OSX */
/* workaround for wong timezone under MacOSX */
long my_timezone() {
#if defined(OS_MACOSX) || defined(__FreeBSD__) || defined(__OpenBSD__)
time_t tp;
time(&tp);
return -localtime(&tp)->tm_gmtoff;
#elif defined(OS_WINNT)
return _timezone;
#else
return timezone;
#endif
@@ -21622,7 +21624,7 @@ void show_elog_list(LOGBOOK *lbs, int past_n, int last_n, int page_n, BOOL defau
strcpy(str, "-");
else
my_strftime(str, sizeof(str), format, ptms);
sprintf(str + strlen(str), " [%ld]", ltime);
sprintf(str + strlen(str), " [%ld]", (long)time);
} else if (attr_flags[i] & AF_DATETIME) {
@@ -21638,7 +21640,7 @@ void show_elog_list(LOGBOOK *lbs, int past_n, int last_n, int page_n, BOOL defau
strcpy(str, "-");
else
my_strftime(str, sizeof(str), format, ptms);
sprintf(str + strlen(str), " [%ld]", ltime);
sprintf(str + strlen(str), " [%ld]", (long)ltime);
}
xmlencode(str);