Skip to content

Commit

Permalink
Merge pull request #25 from matiaskorhonen/localtime
Browse files Browse the repository at this point in the history
Make UTC optional
  • Loading branch information
gavinheavyside committed Oct 23, 2014
2 parents 4fa2026 + 675361e commit 964c57d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/capistrano/deploytags.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@ def self.git_tag_for(stage)
end

def self.formatted_time
Time.new.utc.strftime(fetch(:deploytag_time_format, "%Y.%m.%d-%H%M%S-utc"))
now = if fetch(:deploytag_utc, true)
Time.now.utc
else
Time.now
end

now.strftime(fetch(:deploytag_time_format, "%Y.%m.%d-%H%M%S-#{now.zone.downcase}"))
end

def self.commit_message(current_sha, stage)
Expand Down

0 comments on commit 964c57d

Please sign in to comment.