Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-35053

Spark UI Stages->Tasks should show local launch time

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Won't Fix
    • 3.1.1
    • None
    • Web UI
    • None

    Description

      Hello!

      The launch time of the task displayed on the Spark Stage tab is the UTC time zone, which confuses users in non-UTC time zones. After checking some of the code, it seems that it can be solved by modifying the following code.

      File involved

       

      Current :

      // code placeholder
      function formatDate(date) {
        if (date <= 0) return "-";
        else {
           var dt = new Date(date.replace("GMT", "Z"));
           return formatDateString(dt);
        }
      }
      
      

      Updated (example):

      // code placeholder
      function formatDate(date) {
          if (date <= 0) {
              return "-";
          }
          else {
              let local = new Date();
              let gmtTime = new Date(date.split(".")[0].replace("T", " "));
              let res = new Date(gmtTime.getTime() - (local.getTimezoneOffset() * 60000)).getTime();
              return formatTimeMillis(res);
          }
      }
      

       

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            LiDongwei LiDongwei
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: