Last active
March 15, 2021 15:58
-
-
Save dineshba/ddcb6024a7f0c39c0490e41dd775c8e3 to your computer and use it in GitHub Desktop.
Jenkins local date conversion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Local Jenkins job dates | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description use local date for Jenkins jobs | |
// @author You | |
// @match *jenkins* | |
// @grant none | |
// ==/UserScript==(function() { | |
'use strict'; | |
const allTimes = document.querySelectorAll('div[time]'); | |
allTimes.forEach(d => {d.textContent = new Date(+d.getAttribute('time')).toLocaleString('en-US', {day: "2-digit", month: "short", year: "numeric", hour: "numeric", minute: "numeric"}) + " IST";}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment