From d9087356a1b44633354653b00496547ce4267560 Mon Sep 17 00:00:00 2001 From: Uri Lublin Date: Sat, 18 May 2013 02:42:39 +0200 Subject: vdlog.h: do not use Windows specific time functions --- vdlog.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vdlog.h b/vdlog.h index 5a794b6..9fc2cec 100644 --- a/vdlog.h +++ b/vdlog.h @@ -61,11 +61,11 @@ static unsigned int log_level = LOG_INFO; VDLog* log = VDLog::get(); \ const char *type_as_char[] = { "DEBUG", "INFO", "WARN", "ERROR", "FATAL" }; \ struct _timeb now; \ - struct tm today; \ + struct tm *today; \ char datetime_str[20]; \ - _ftime_s(&now); \ - localtime_s(&today, &now.time); \ - strftime(datetime_str, 20, "%Y-%m-%d %H:%M:%S", &today); \ + _ftime(&now); \ + today = localtime(&now.time); \ + strftime(datetime_str, 20, "%Y-%m-%d %H:%M:%S", today); \ if (log) { \ log->PRINT_LINE(type_as_char[type], format, datetime_str, now.millitm, ## __VA_ARGS__); \ } else { \ -- cgit v1.2.3