Github user holdenk commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14398#discussion_r72879633
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeUtils.scala
 ---
    @@ -875,11 +877,11 @@ object DateTimeUtils {
             val hh = seconds / 3600
             val mm = seconds / 60 % 60
             val ss = seconds % 60
    -        val nano = millisOfDay % 1000 * 1000000
    +        val calendar = Calendar.getInstance(tz)
     
    -        // create a Timestamp to get the unix timestamp (in UTC)
    -        val timestamp = new Timestamp(year - 1900, month - 1, day, hh, mm, 
ss, nano)
    -        guess = (millisLocal - timestamp.getTime).toInt
    +        calendar.set(year, month, day, hh, mm, ss)
    --- End diff --
    
    So DST is probably ok and my tests are just borked - so lets go with the 
new calendar approach and I'll fix it to preserve ms information.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to