From e8b6d23522ea10d32472e260f23c87d91eecce95 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Fri, 26 May 2023 00:39:12 -0400 Subject: [PATCH] time_zone: Don't double up the std::abs Too many absolute values were causing mirrored time zones to resolve as the same. --- src/common/time_zone.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/common/time_zone.cpp b/src/common/time_zone.cpp index 7cd4431e5f..717d751ba0 100644 --- a/src/common/time_zone.cpp +++ b/src/common/time_zone.cpp @@ -100,8 +100,7 @@ std::string FindSystemTimeZone() { } const auto offset = offsets[i]; - const int difference = - static_cast(std::abs(std::abs(offset) - std::abs(system_offset))); + const int difference = static_cast(std::abs(offset - system_offset)); if (difference < min) { min = difference; min_index = i;