morningman commented on a change in pull request #4187:
URL: https://github.com/apache/incubator-doris/pull/4187#discussion_r460519840
##########
File path: fe/fe-core/src/main/java/org/apache/doris/common/util/TimeUtils.java
##########
@@ -256,7 +256,7 @@ public static String
checkTimeZoneValidAndStandardize(String value) throws DdlEx
Matcher matcher = TIMEZONE_OFFSET_FORMAT_REG.matcher(value);
// it supports offset and region timezone type, "CST" use here is
compatibility purposes.
boolean match = matcher.matches();
- if (!value.contains("/") && !value.equals("CST") && !match) {
+ if (!value.contains("/") && !value.equals("CST") &&
!value.equals("UTC") && !match) {
Review comment:
With more and more time zone added, I think it is better to refactor
this judgment to make it easy to maintain.
##########
File path: fe/fe-core/src/main/java/org/apache/doris/common/util/TimeUtils.java
##########
@@ -55,7 +55,7 @@
// set CST to +08:00 instead of America/Chicago
public static final ImmutableMap<String, String> timeZoneAliasMap =
ImmutableMap.of(
- "CST", DEFAULT_TIME_ZONE, "PRC", DEFAULT_TIME_ZONE);
+ "CST", DEFAULT_TIME_ZONE, "PRC", DEFAULT_TIME_ZONE, "UTC",
DEFAULT_TIME_ZONE);
Review comment:
I think `DEFAULT_TIME_ZONE` means `UTC+8` ? Not equals to `UTC`?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]