vasiliy-mikhailov opened a new pull request, #38932:
URL: https://github.com/apache/shardingsphere/pull/38932

   The static `EPOCH` for `2016-11-01 00:00:00` is converted to epoch millis 
using the JVM's **default timezone** offset 
(`ZoneId.systemDefault()...getOffset(Instant.now())`). The Snowflake key 
timestamps therefore shift with the server's timezone, which can cause 
duplicate or mis-ordered keys across deployments in different zones. Use 
`ZoneOffset.UTC` so the epoch is timezone-independent.
   
   Added a test (run under `-Duser.timezone=Asia/Shanghai`) asserting the epoch 
equals the UTC-based value.
   


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