yiguolei commented on code in PR #42395: URL: https://github.com/apache/doris/pull/42395#discussion_r1815914599
########## be/src/util/timezone_utils.cpp: ########## @@ -106,7 +107,33 @@ void TimezoneUtils::load_timezones_to_cache() { } lower_zone_cache_->erase("lmt"); // local mean time for every timezone - LOG(INFO) << "Read " << lower_zone_cache_->size() << " timezones."; + + load_offsets_to_cache(); + LOG(INFO) << "Preloaded" << lower_zone_cache_->size() << " timezones."; +} + +static std::string to_hour_string(int arg) { + if (arg < 0 && arg > -10) { // -9 to -1 + return std::string {"-0"} + std::to_string(std::abs(arg)); + } else if (arg >= 0 && arg < 10) { //0 to 9 + return std::string {"0"} + std::to_string(arg); + } + return std::to_string(arg); +} + +void TimezoneUtils::load_offsets_to_cache() { Review Comment: add unit test for all the methods -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org