LuciferYang commented on PR #42039:
URL: https://github.com/apache/spark/pull/42039#issuecomment-1648067220

   @srowen This is not the first case, the first case we can see 
https://github.com/apache/spark/pull/40395
   
   ```
   Run `LocalDateTime.now()` and `Instant.now()` with Java 8 & 11 always get 
microseconds on both Linux and MacOS, but there are some differences when using 
Java 17, it will get accurate nanoseconds on Linux, but still get the 
microseconds on MacOS. 
   
   On Linux(CentOs)
   
   ```
   jshell> java.time.LocalDateTime.now()
   $1 ==> 2023-03-13T18:09:12.498162194
   
   jshell> java.time.Instant.now()
   $2 ==> 2023-03-13T10:09:16.013993186Z
   ```
   
   On MacOS
   
   ```
   jshell> java.time.LocalDateTime.now()
   $1 ==> 2023-03-13T17:13:47.485897
   
   jshell> java.time.Instant.now()
   $2 ==> 2023-03-13T09:15:12.031850Z
   ```
    
   At present, Spark always converts them to microseconds ...
   ```
   
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to