[Fix] Fix the JSONUtils tool class time zone problem #10282#10284
[Fix] Fix the JSONUtils tool class time zone problem #10282#10284caishunfeng merged 5 commits intoapache:devfrom 106umao:fix#10282
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #10284 +/- ##
============================================
- Coverage 40.86% 40.86% -0.01%
+ Complexity 4845 4844 -1
============================================
Files 885 885
Lines 35974 35976 +2
Branches 3993 3993
============================================
- Hits 14702 14700 -2
- Misses 19818 19820 +2
- Partials 1454 1456 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hi @SbloodyS @zhuangchong |
|
The issue had been fixed #10345 |
So we do not need this anymore, is it? |
|
@zhongjiajie |
The reason of still failed is that the github action's host machine's timezone is UTC by default. But your local timezone is not. |
|
@SbloodyS |
As @SbloodyS said, I think we need this pr. @106umao please solve the conflicts, thanks. |
|
Hi @106umao , I have noticed that many CI failed for this reason. So I helped you solve the conflict and optimize it. Hoped you don't mind. |
add timezone import
|
Kudos, SonarCloud Quality Gate passed! |
@SbloodyS @caishunfeng thx. |
…ache#10284) * [Fix] Fix the JSONUtils tool class time zone problem apache#10282 * [Fix] Fix the JSONUtils tool class time zone problem apache#10282 * Update JSONUtils.java remove unnessnary log * Update JSONUtilsTest.java add timezone import Co-authored-by: xiangzihao <460888207@qq.com>
…ache#10284) * [Fix] Fix the JSONUtils tool class time zone problem apache#10282 * [Fix] Fix the JSONUtils tool class time zone problem apache#10282 * Update JSONUtils.java remove unnessnary log * Update JSONUtilsTest.java add timezone import Co-authored-by: xiangzihao <460888207@qq.com>










Purpose of the pull request
Fixed #10282
Brief change log
Add static method
setTimeZone(TimeZone timeZone)for classorg.apache.dolphinscheduler.common.utils.JSONUtilsThe purpose of the method is to support dynamic modification of the TimeZone setting of the ObjectMapper object
Verify this pull request
This pull request is already covered by existing tests, such as (please describe tests).
method
org.apache.dolphinscheduler.common.utils.JSONUtilsTest#dateToStringmethod
org.apache.dolphinscheduler.common.utils.JSONUtilsTest#stringToDateThis change added tests and can be verified as follows:
Run
mvn clean testin terminal