You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2021/10/19 02:47:11 UTC

[GitHub] [servicecomb-java-chassis] huanghezhen opened a new issue #2616: localDateTime 时区问题

huanghezhen opened a new issue #2616:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2616


   这里面是使用网关调用的
   
   接口是
   ```java
   @PostMapping("/time")
   public MyResponse<?> time(@RequestBody TimeFORM param) {
       System.out.println(param.getDate());
       System.out.println(param.getLocalDateTime());
       return MyResponse.newInstance();
   }
   ```
   接口的入参是
   ```java
   @Getter
   @Setter
   public class TimeFORM {
       private LocalDateTime localDateTime;
       private Date date;
   }
   ```
   调用网关的 入参
   ```json
   {
       "date": 1634610279000,
       "localDateTime": 1634610279000
   }
   ```
   
   结果
   ```java
   Tue Oct 19 10:24:39 CST 2021
   2021-10-19T02:24:39
   ```
   
   问题: 这里面的处理机制是啥?  时间相差了8个小时  localDateTime 如何指定转换的时区


-- 
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: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [servicecomb-java-chassis] huanghezhen closed issue #2616: localDateTime 时区问题

Posted by GitBox <gi...@apache.org>.
huanghezhen closed issue #2616:
URL: https://github.com/apache/servicecomb-java-chassis/issues/2616


   


-- 
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: commits-unsubscribe@servicecomb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org