-
Notifications
You must be signed in to change notification settings - Fork 304
/
timezone.groovy
executable file
·20 lines (19 loc) · 788 Bytes
/
timezone.groovy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!groovy
//-------------------------------------------------------------------
// @copyright 2018 DennyZhang.com
// Licensed under MIT
// https://www.dennyzhang.com/wp-content/mit_license.txt
//
// File: timezone.groovy
// Author : Denny <https://www.dennyzhang.com/contact>
// Link: https://cheatsheet.dennyzhang.com/cheatsheet-jenkins-groovy-a4
// --
// Created : <2018-04-20>
// Updated: Time-stamp: <2019-02-16 22:04:03>
//-------------------------------------------------------------------
// Configure Jenkins java options
// timezone: Asia/Shanghai, America/New_York, America/Los_Angeles
// https://www.epochconverter.com/timezones
// ENV JENKINS_TIMEZONE "UTC"
def env = System.getenv();
System.setProperty('org.apache.commons.jelly.tags.fmt.timeZone', env['JENKINS_TIMEZONE']);