You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2023/01/08 08:32:56 UTC

[GitHub] [inlong] e-mhui opened a new pull request, #7187: [INLONG-7186][Sort] Fix time zone incorrect

e-mhui opened a new pull request, #7187:
URL: https://github.com/apache/inlong/pull/7187

   ### Prepare a Pull Request
   
   Fix time zone incorrect.
   
   - Fixes #7186 
   
   ### Motivation
   
   The data with datetime and timestamp format are written to iceberg, and the time zone is incorrect.
   
   ### Modifications
   
   1. timestamp without timezone: get his timestamp directly without any time zone.
   
   ```java
   TimestampData.fromEpochMillis(Timestamp.valueOf(LocalDateTime.of(localDate, localTime)).getTime());
   ```
   
   3. timestamp with timezone: use local time zone
   
   ```java
   TimestampData.fromInstant(
                   LocalDateTime.of(localDate, localTime).atZone(ZoneId.systemDefault()).toInstant());
   ```


-- 
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@inlong.apache.org

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


[GitHub] [inlong] yunqingmoswu merged pull request #7187: [INLONG-7186][Sort] Fix time zone incorrect

Posted by GitBox <gi...@apache.org>.
yunqingmoswu merged PR #7187:
URL: https://github.com/apache/inlong/pull/7187


-- 
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@inlong.apache.org

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