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

    https://github.com/apache/spark/pull/7344#discussion_r34402703
  
    --- Diff: python/pyspark/sql/tests.py ---
    @@ -705,11 +705,12 @@ def test_filter_with_datetime(self):
         def test_time_with_timezone(self):
             day = datetime.date.today()
             now = datetime.datetime.now()
    -        ts = time.mktime(now.timetuple()) + now.microsecond / 1e6
    +        ts = time.mktime(now.timetuple())
             # class in __main__ is not serializable
             from pyspark.sql.tests import UTC
             utc = UTC()
    -        utcnow = datetime.datetime.fromtimestamp(ts, utc)
    +        utcnow = datetime.datetime.utcfromtimestamp(ts)  # without 
microseconds
    +        utcnow = datetime.datetime(*(utcnow.timetuple()[:6] + 
(now.microsecond, utc)))
    --- End diff --
    
    (and just merge it after adding the comment)


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