Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
  • Loading branch information
zhztheplayer committed Aug 5, 2024
1 parent 0bb6720 commit 04c6074
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions velox/type/tz/TimeZoneMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,16 @@ TTimeZoneDatabase buildTimeZoneDatabase(
// Every single other time zone entry (outside of offsets) needs to be
// available in external/date or this will throw.
else {
const date::time_zone* zone;
try {
auto zone = date::locate_zone(entry.second);
timeZonePtr =
std::make_unique<TimeZone>(entry.second, entry.first, zone);
zone = date::locate_zone(entry.second);
} catch (std::runtime_error& err) {
// Timezone not found in OS, skip it.
LOG(WARNING) << "Timezone [" << entry.second << "] not found due to: '"
<< err.what() << "', ignoring it. ";
continue;
}
timeZonePtr = std::make_unique<TimeZone>(entry.second, entry.first, zone);
}
tzDatabase[entry.first] = std::move(timeZonePtr);
}
Expand Down

0 comments on commit 04c6074

Please sign in to comment.