imay commented on a change in pull request #1587: Set timezone variable in fe
URL: https://github.com/apache/incubator-doris/pull/1587#discussion_r311015053
##########
File path: fe/src/main/java/org/apache/doris/common/util/TimeUtils.java
##########
@@ -205,4 +212,29 @@ public static long timeStringToLong(String timeStr) {
}
return d.getTime();
}
+
+ // Check if the time zone_value is valid
+ public static void checkTimeZoneValid(String value) throws DdlException {
+ try {
+ // match offset type, such as +08:00, -07:00
+ Pattern p = Pattern.compile("^[+-]{1}\\d{2}\\:\\d{2}$");
Review comment:
I think you can make this static to compile it only one time
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]