Skip to content

Instantly share code, notes, and snippets.

@dineshba
Last active March 15, 2021 15:58
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save dineshba/ddcb6024a7f0c39c0490e41dd775c8e3 to your computer and use it in GitHub Desktop.
Jenkins local date conversion
// ==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