Skip to content

Commit 3095515

Browse files
committed
fix time format in console output
1 parent f0093be commit 3095515

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • src/dashboard-client/src/models

src/dashboard-client/src/models/Job.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import NotificationService from '../services/NotificationService'
44
import NewAPIService from '../services/NewAPIService'
55
import store from '../store'
66
import router from '../router'
7+
import moment from 'moment'
8+
79
const Convert = require('ansi-to-html')
810

911
class Section {
@@ -187,7 +189,7 @@ export default class Job {
187189
// Replace UTC time with local time
188190
idx = line.indexOf('|')
189191
if (idx > 0) {
190-
let localTime = date.getHours() + ':' + date.getMinutes() + ':' + date.getSeconds()
192+
let localTime = moment(date).format('HH:mm:ss')
191193
line = localTime + line.substr(idx)
192194
}
193195

0 commit comments

Comments
 (0)