summaryrefslogtreecommitdiff
path: root/lib/bitbucket_server/representation/base.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/bitbucket_server/representation/base.rb')
-rw-r--r--lib/bitbucket_server/representation/base.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/bitbucket_server/representation/base.rb b/lib/bitbucket_server/representation/base.rb
index 0f3f2b60f5a..a1961bae6ef 100644
--- a/lib/bitbucket_server/representation/base.rb
+++ b/lib/bitbucket_server/representation/base.rb
@@ -12,6 +12,10 @@ module BitbucketServer
def self.decorate(entries)
entries.map { |entry| new(entry)}
end
+
+ def self.convert_timestamp(time_usec)
+ Time.at(time_usec / 1000) if time_usec.is_a?(Integer)
+ end
end
end
end