Browse Source

[Feature-8530][API] add system default timezone if no user timezone when get userInfo (#8899)

Co-authored-by: caishunfeng <534328519@qq.com>
3.0.0/version-upgrade
caishunfeng 3 years ago committed by GitHub
parent
commit
60fbbcb790
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/UsersServiceImpl.java

6
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);

Loading…
Cancel
Save