caishunfeng opened a new issue #8385:
URL: https://github.com/apache/dolphinscheduler/issues/8385


   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and 
found no similar feature requirement.
   
   
   ### Description
   
   Now DS use the default timezone GMT+8, and add the @JsonFormat(pattern = 
"yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") on date type field in many object, 
which is hard to unified timezone and change it.
   ```
       /**
        * task submit time
        */
       @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
       private Date submitTime;
   ```
   
   And response different date-format from ApiServer, some like 
'2022-01-24T11:56:51.000+0800', and some like '2022-01-24 18:16:35', which is 
not friendly to client parsing.
   
![image](https://user-images.githubusercontent.com/11962619/153984645-833a8d73-c849-40db-ac7a-769b48eda4c5.png)
   
   
   ### Use case
   
   Use spring config to unified timezone and date-format:
   ```
   spring:
     application:
       name: api-server
     jackson:
       time-zone: UTC
       date-format: "yyyy-MM-dd HH:mm:ss"
   ```
   
   Remove the annotation @JsonFormat, unless need to specify another format.
   
   And we should list the user-facing change.
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to