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

Spark UI Stages->Tasks should show local launch time

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 3.1.1
    • Fix Version/s: None
    • Component/s: Web UI
    • Labels:
      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

            • Assignee:
              Unassigned
              Reporter:
              LiDongwei LiDongwei
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: