Skip to content

Commit

Permalink
updated code as per comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ArqamFarooqui110719 committed Aug 29, 2024
1 parent 25b0d0c commit d0fb1aa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/lib/common/globals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <stdint.h>
#include <math.h>
#include <stdio.h>
#include <ctype.h>

#include <string>

Expand Down Expand Up @@ -612,9 +613,10 @@ double parse8601Time(const std::string& ss)
// The following 'for' loop is implemented to handle a specific datetime case where the datetime string
// is '2016-04-05T14:10:0x.00Z'. This particular case is being incorrectly PASS through the
// sscanf() function i.e. used next to this 'for' loop.
for (char c : ss)
for (int i = 0; ss[i] != '\0'; i++)
{
if (std::isalpha(c) && c != 'T' && c != 'Z')
char c = ss[i];
if (isalpha(c) && c != 'T' && c != 'Z')
{
return -1;
}
Expand Down

0 comments on commit d0fb1aa

Please sign in to comment.