Github user davies commented on the pull request:

    https://github.com/apache/spark/pull/8400#issuecomment-134673657
  
    @liancheng Thanks for the comments, but you may made a mistake somewhere, I 
got this WITHOUT this PR:
    ```
    scala> TimeZone.setDefault(TimeZone.getTimeZone("GMT"))
    scala> val timestamp = Timestamp.valueOf("1970-01-01 00:00:00")
    timestamp: java.sql.Timestamp = 1970-01-01 00:00:00.0
    
    scala> val (sparkJulianDay, sparkTimeOfDayNanos) =
         |   
DateTimeUtils.toJulianDay(DateTimeUtils.fromJavaTimestamp(timestamp))
    sparkJulianDay: Int = 2440587
    sparkTimeOfDayNanos: Long = 43200000000000
    
    scala> println(
         |   s"""Spark converts "$timestamp" to Julian timestamp:
         |      |(julianDay=$sparkJulianDay, 
timeOfDayNanos=$sparkTimeOfDayNanos)
         |    """.stripMargin)
    Spark converts "1970-01-01 00:00:00.0" to Julian timestamp:
    (julianDay=2440587, timeOfDayNanos=43200000000000)
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

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

Reply via email to