time_zone: Don't double up the std::abs
Too many absolute values were causing mirrored time zones to resolve as the same.
This commit is contained in:
parent
3d32ff15cd
commit
e8b6d23522
1 changed files with 1 additions and 2 deletions
|
@ -100,8 +100,7 @@ std::string FindSystemTimeZone() {
|
|||
}
|
||||
|
||||
const auto offset = offsets[i];
|
||||
const int difference =
|
||||
static_cast<int>(std::abs(std::abs(offset) - std::abs(system_offset)));
|
||||
const int difference = static_cast<int>(std::abs(offset - system_offset));
|
||||
if (difference < min) {
|
||||
min = difference;
|
||||
min_index = i;
|
||||
|
|
Loading…
Add table
Reference in a new issue