Skip to content

Commit

Permalink
zanata-functions: time_stamp
Browse files Browse the repository at this point in the history
  • Loading branch information
definite committed Jun 29, 2015
1 parent 1a44cfa commit 825d815
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions zanata-functions
Expand Up @@ -159,6 +159,18 @@ function get_devel_branch(){
return 0
}

### time-stamp [DATE_FORMAT]
### Use stamp like "2015-06-29-06:56:34-953717856", base on UTC
### Default: '%F-%R-%N'
###
function time-stamp(){
local DATE_FORMAT=$1
if [ -z "$DATE_FORMAT" ];then
DATE_FORMAT='%F-%R-%N'
fi
date -u +"$DATE_FORMAT"
}

###
### EXIT_STATUS
### Success
Expand Down

0 comments on commit 825d815

Please sign in to comment.