Skip to content

Commit

Permalink
Fixed a bug in the timezone handling in the build timestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
pditommaso committed Jul 22, 2013
1 parent 9de14c9 commit 21e0976
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/main/groovy/nextflow/Const.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,12 @@ class Const {
/**
* The app build time as linux/unix timestamp
*/
static final long APP_TIMESTAMP = 1374446823220
static final long APP_TIMESTAMP = 1374494956265

/**
* The app build number
*/
static final int APP_BUILDNUM = 702
static final int APP_BUILDNUM = 703

/**
* The date time formatter string
Expand Down Expand Up @@ -103,7 +103,12 @@ class Const {
def utc = APP_TIMESTAMP_UTC.split(' ')
def loc = APP_TIMESTAMP_LOCAL.split(' ')

utc[0] == loc[0] ? loc[1,-1].join(' ') : loc.join(' ')
if( APP_TIMESTAMP_UTC == APP_TIMESTAMP_LOCAL ) {
return ''
}

def result = utc[0] == loc[0] ? loc[1,-1].join(' ') : loc.join(' ')
return "($result)"
}

/*
Expand All @@ -115,7 +120,7 @@ class Const {
"""
N E X T F L O W
Version ${APP_VER} build ${APP_BUILDNUM}
last modified ${APP_TIMESTAMP_UTC} (${deltaLocal()})
last modified ${APP_TIMESTAMP_UTC} ${deltaLocal()}
http://nextflow-project.org
"""

Expand Down

0 comments on commit 21e0976

Please sign in to comment.