Changeset 258586 in webkit


Ignore:
Timestamp:
Mar 17, 2020 1:47:44 PM (4 years ago)
Author:
aakash_jain@apple.com
Message:

[ews-app] Timestamp shown in status-bubble hover-over message is in future
https://bugs.webkit.org/show_bug.cgi?id=196628

Reviewed by Jonathan Bedard.

  • BuildSlaveSupport/ews-build/events.py:

(JSONProducer.json_serialize_datetime): Keep the timestamp in UTC, instead of converting it to local time zone.

  • BuildSlaveSupport/ews-app/ews/views/statusbubble.py:

(StatusBubble.get_all_builds_for_queue): Sort the queues based on build number instead of start time, since the
timestamps for new builds might be less than timestamps for old builds which completed immediately prior to this change.

Location:
trunk/Tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/BuildSlaveSupport/ews-app/ews/views/statusbubble.py

    r258271 r258586  
    242242        if not builds:
    243243            return (None, None)
    244         builds.sort(key=lambda build: build.started_at, reverse=True)
     244        builds.sort(key=lambda build: build.number, reverse=True)
    245245        return (builds, is_parent_build)
    246246
  • trunk/Tools/BuildSlaveSupport/ews-build/events.py

    r243822 r258586  
    2121# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2222
     23import calendar
    2324import datetime
    2425import json
     
    6667        """
    6768        if isinstance(obj, datetime.datetime):
    68             return int(time.mktime(obj.timetuple()))
     69            return int(calendar.timegm(obj.timetuple()))
    6970
    7071        raise TypeError("Type %s not serializable" % type(obj))
  • trunk/Tools/ChangeLog

    r258574 r258586  
     12020-03-17  Aakash Jain  <aakash_jain@apple.com>
     2
     3        [ews-app] Timestamp shown in status-bubble hover-over message is in future
     4        https://bugs.webkit.org/show_bug.cgi?id=196628
     5
     6        Reviewed by Jonathan Bedard.
     7
     8        * BuildSlaveSupport/ews-build/events.py:
     9        (JSONProducer.json_serialize_datetime): Keep the timestamp in UTC, instead of converting it to local time zone.
     10        * BuildSlaveSupport/ews-app/ews/views/statusbubble.py:
     11        (StatusBubble.get_all_builds_for_queue): Sort the queues based on build number instead of start time, since the
     12        timestamps for new builds might be less than timestamps for old builds which completed immediately prior to this change.
     13
    1142020-03-17  Alex Christensen  <achristensen@webkit.org>
    215
Note: See TracChangeset for help on using the changeset viewer.