[
https://issues.apache.org/jira/browse/SPARK-35053?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17324397#comment-17324397
]
Hyukjin Kwon commented on SPARK-35053:
--------------------------------------
Please refer to SPARK-32068
> Spark UI Stages->Tasks should show local launch time
> ----------------------------------------------------
>
> Key: SPARK-35053
> URL: https://issues.apache.org/jira/browse/SPARK-35053
> Project: Spark
> Issue Type: Bug
> Components: Web UI
> Affects Versions: 3.1.1
> Reporter: LiDongwei
> Priority: Minor
>
> 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
> |https://github.com/apache/spark/blob/master/core/src/main/resources/org/apache/spark/ui/static/utils.js]
>
> Current :
> {code:java}
> // code placeholder
> function formatDate(date) {
> if (date <= 0) return "-";
> else {
> var dt = new Date(date.replace("GMT", "Z"));
> return formatDateString(dt);
> }
> }
> {code}
> Updated (example):
> {code:java}
> // 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);
> }
> }
> {code}
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]