Forráskód Böngészése

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 éve
szülő
commit
7c58e1a042
1 módosított fájl, 2 hozzáadás és 0 törlés
  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);
     }