浏览代码

HPCC-17027 Initialise (unused) tm_wday and tm_mday in the tm struct

Signed-off-by: Gavin Halliday <gavin.halliday@lexisnexis.com>
Gavin Halliday 8 年之前
父节点
当前提交
7c58e1a042
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      system/jlib/jtime.cpp

+ 2 - 0
system/jlib/jtime.cpp

@@ -305,6 +305,8 @@ void CDateTime::set(unsigned year, unsigned month, unsigned day, unsigned hour,
         local.tm_min = minute;
         local.tm_sec = second;
         local.tm_isdst = -1;
+        local.tm_wday = 0;
+        local.tm_yday = 0;
         time_t simple = timelocal(&local);
         set(simple);
     }