github-actions[bot] commented on code in PR #65692:
URL: https://github.com/apache/doris/pull/65692#discussion_r3594338847
##########
regression-test/suites/datatype_p0/datetimev2/test_curdate_fold.groovy:
##########
@@ -18,6 +18,14 @@
suite("test_curdate_fold") {
def tbName = "test_curdate_fold"
+ def originalTimeZone = sql("SELECT @@session.time_zone")[0][0].toString()
+ onFinish {
+ try_sql "SET time_zone = '${originalTimeZone}'"
+ }
+
+ def utcHour = sql("SELECT
HOUR(UTC_TIMESTAMP())")[0][0].toString().toInteger()
+ def safeTimeZone = String.format("%+03d:00", 12 - utcHour)
Review Comment:
There are two default-locale formatting stages on this path. This
`String.format` can emit `+٠٨:00`; even forcing ASCII here alone is
insufficient because FE's `TimeUtils.checkTimeZoneValidAndStandardize`
re-formats numeric offsets with its own default locale, producing `+٠٨:٠٠` and
then failing `ZoneId.of`. Neither launch path pins `user.language`, so the
suite fails before its assertions under such a locale. Avoid numeric-offset
standardization entirely by using fixed `Etc/GMT` zone IDs (whose POSIX sign is
reversed):
```suggestion
def etcGmtOffset = utcHour - 12
def safeTimeZone = "Etc/GMT${etcGmtOffset >= 0 ? '+' :
''}${etcGmtOffset}"
```
--
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]