1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

feature #661: Add time_to_str function

This commit is contained in:
Daniel Molina 2011-06-08 15:14:34 +02:00
parent 2bf5cdf3b8
commit 162e166d70

View File

@ -231,4 +231,13 @@ module OpenNebulaHelper
gid
end
end
def OpenNebulaHelper.time_to_str(time)
value=time.to_i
if value==0
value='-'
else
value=Time.at(value).strftime("%m/%d %H:%M:%S")
end
end
end