diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java index 441f44b530..d2ab2add20 100644 --- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java +++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java @@ -66,6 +66,7 @@ import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; +import java.util.TimeZone; import java.util.stream.Collectors; import org.slf4j.Logger; @@ -886,6 +887,11 @@ public class UsersServiceImpl extends BaseServiceImpl implements UsersService { } } + // add system default timezone if not user timezone + if (StringUtils.isEmpty(user.getTimeZone())) { + user.setTimeZone(TimeZone.getDefault().toZoneId().getId()); + } + result.put(Constants.DATA_LIST, user); putMsg(result, Status.SUCCESS);