mirror of
https://gitee.com/dolphinscheduler/DolphinScheduler.git
synced 2024-12-05 05:38:30 +08:00
[Feature-8530][API] add system default timezone if no user timezone when get userInfo (#8899)
Co-authored-by: caishunfeng <534328519@qq.com>
This commit is contained in:
parent
58e341c19c
commit
60fbbcb790
@ -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…
Reference in New Issue
Block a user