Skip to content

Commit

Permalink
RDK-54097: Analytics L2 fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianM27 committed Dec 9, 2024
1 parent c656b03 commit 0918f13
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
14 changes: 3 additions & 11 deletions Analytics/Implementation/SystemTime/SystemTime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,19 +101,11 @@ namespace WPEFramework

SystemTime::TimeZoneAccuracy SystemTime::GetTimeZoneOffset(int32_t &offsetSec)
{
std::string tz;
std::string accuracyString;
bool isTimeAvailable = false;
{
std::lock_guard<std::mutex> guard(mLock);
tz = mTimeZone;
accuracyString = mTimeZoneAccuracyString;
isTimeAvailable = mIsSystemTimeAvailable;
}
std::lock_guard<std::mutex> guard(mLock);

if (isTimeAvailable)
if (mIsSystemTimeAvailable)
{
std::pair<SystemTime::TimeZoneAccuracy, int32_t> tzParsed = ParseTimeZone(tz, accuracyString);
std::pair<SystemTime::TimeZoneAccuracy, int32_t> tzParsed = ParseTimeZone(mTimeZone, mTimeZoneAccuracyString);
offsetSec = tzParsed.second;
return tzParsed.first;
}
Expand Down
2 changes: 1 addition & 1 deletion Tests/L2Tests/L2TestsPlugin/tests/Analytics_L2Test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#define SIFT_SERVER_IP "127.0.0.1"
#define SIFT_SERVER_PORT 12345
#define SIFT_SERVER_TIMEOUT_SEC (30)
#define SIFT_SERVER_TIMEOUT_SEC (2*30)

#define ZDUMP_MOCK_OUT "America/New_York Sun Mar 9 07:00:00 2008 UT = Sun Mar 9 03:00:00 2008 EDT isdst=1 gmtoff=-14400\n" \
"America/New_York Sun Nov 2 05:59:59 2008 UT = Sun Nov 2 01:59:59 2008 EDT isdst=1 gmtoff=-14400\n" \
Expand Down

0 comments on commit 0918f13

Please sign in to comment.