From 2bfec3a736bebb155338e4777681d25cf40a6021 Mon Sep 17 00:00:00 2001 From: yanz Date: Fri, 28 Feb 2025 09:39:43 +0800 Subject: [PATCH] fix for comment --- be/src/runtime/time_types.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/be/src/runtime/time_types.h b/be/src/runtime/time_types.h index df3a4f2503be1..ffbbb8b21caac 100644 --- a/be/src/runtime/time_types.h +++ b/be/src/runtime/time_types.h @@ -377,7 +377,8 @@ int timestamp::get_timezone_offset_by_timestamp(Timestamp timestamp, const cctz: int timestamp::get_timezone_offset_by_epoch_seconds(int64_t seconds_from_epoch, const cctz::time_zone& ctz) { // if system_clock duration is nanoseconds(libstdc++), and to avoid overflow - // followings are min and max values. how I get these values? ask deepseek. + // std::numeric_limits::max() / 1'000'000'000 + // std::numeric_limits::min() / 1'000'000'000 static constexpr int64_t MIN_SECONDS = -9223372036; static constexpr int64_t MAX_SECONDS = 9223372036; seconds_from_epoch = std::max(MIN_SECONDS, std::min(MAX_SECONDS, seconds_from_epoch));