Skip to content

Commit 21e0976

Browse files
committed
Fixed a bug in the timezone handling in the build timestamp
1 parent 9de14c9 commit 21e0976

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/main/groovy/nextflow/Const.groovy

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ class Const {
6262
/**
6363
* The app build time as linux/unix timestamp
6464
*/
65-
static final long APP_TIMESTAMP = 1374446823220
65+
static final long APP_TIMESTAMP = 1374494956265
6666

6767
/**
6868
* The app build number
6969
*/
70-
static final int APP_BUILDNUM = 702
70+
static final int APP_BUILDNUM = 703
7171

7272
/**
7373
* The date time formatter string
@@ -103,7 +103,12 @@ class Const {
103103
def utc = APP_TIMESTAMP_UTC.split(' ')
104104
def loc = APP_TIMESTAMP_LOCAL.split(' ')
105105

106-
utc[0] == loc[0] ? loc[1,-1].join(' ') : loc.join(' ')
106+
if( APP_TIMESTAMP_UTC == APP_TIMESTAMP_LOCAL ) {
107+
return ''
108+
}
109+
110+
def result = utc[0] == loc[0] ? loc[1,-1].join(' ') : loc.join(' ')
111+
return "($result)"
107112
}
108113

109114
/*
@@ -115,7 +120,7 @@ class Const {
115120
"""
116121
N E X T F L O W
117122
Version ${APP_VER} build ${APP_BUILDNUM}
118-
last modified ${APP_TIMESTAMP_UTC} (${deltaLocal()})
123+
last modified ${APP_TIMESTAMP_UTC} ${deltaLocal()}
119124
http://nextflow-project.org
120125
"""
121126

0 commit comments

Comments
 (0)