File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -178,15 +178,15 @@ namespace netlicensing {
178178 // ttl returns with new line character ("\n") is appended at the end of the string and "\" at the begin of string.
179179 std::string ttl = fastWriter.write (root[" ttl" ]);
180180
181- struct tm tm = { 0 } ;
182- tm .tm_year = atoi (ttl.substr (1 ,4 ).c_str ()) - 1900 ; /* years since 1900 */
183- tm .tm_mon = atoi (ttl.substr (6 , 2 ).c_str ()) - 1 ;
184- tm .tm_mday = atoi (ttl.substr (9 , 2 ).c_str ());
185- tm .tm_hour = atoi (ttl.substr (12 , 2 ).c_str ());
186- tm .tm_min = atoi (ttl.substr (15 , 2 ).c_str ());
187- tm .tm_sec = atoi (ttl.substr (18 , 2 ).c_str ());
181+ struct tm ttlTime ;
182+ ttlTime .tm_year = atoi (ttl.substr (1 ,4 ).c_str ()) - 1900 ; /* years since 1900 */
183+ ttlTime .tm_mon = atoi (ttl.substr (6 , 2 ).c_str ()) - 1 ;
184+ ttlTime .tm_mday = atoi (ttl.substr (9 , 2 ).c_str ());
185+ ttlTime .tm_hour = atoi (ttl.substr (12 , 2 ).c_str ());
186+ ttlTime .tm_min = atoi (ttl.substr (15 , 2 ).c_str ());
187+ ttlTime .tm_sec = atoi (ttl.substr (18 , 2 ).c_str ());
188188
189- time_t rawtime = mktime (&tm );
189+ time_t rawtime = mktime (&ttlTime );
190190 validationResult.setTtl (rawtime);
191191 }
192192
You can’t perform that action at this time.
0 commit comments