morrySnow commented on code in PR #65219:
URL: https://github.com/apache/doris/pull/65219#discussion_r3671740658
##########
fe/fe-core/src/main/java/org/apache/doris/common/util/TimeUtils.java:
##########
@@ -184,6 +184,20 @@ public static String longToTimeStringWithTimeZone(Long
timeStamp, String timeZon
return
dateFormat.format(LocalDateTime.ofInstant(Instant.ofEpochMilli(timeStamp),
dateFormat.getZone()));
}
+ /** Same as {@link #longToTimeStringWithTimeZone(Long, String)} but appends
+ * the timezone offset (e.g. {@code +00:00}, {@code +08:00}) so the
+ * result is an unambiguous UTC instant string that
+ * {@link PropertyAnalyzer#TZ_OFFSET_PATTERN} can detect and route to
+ * {@code TZ_FORMATTER} for instant-aware parsing. */
+ public static String longToTimeStringWithTimeZoneAndOffset(Long timeStamp,
String timeZone) {
+ if (timeStamp == null || timeStamp <= 0L) {
Review Comment:
add ut for this new util function to test min/max cooldown time is ok
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]