Clock.helpers do
def from_utc(time)
time - 14400
end
def time(t, scale = 12)
t = from_utc(t)
if scale == 12
t.strftime("%k:%M").to_s.strip
else
t.strftime("%I:%M")
end
end
end
We shouldn't subtract an absolute value to get the data from UTC to whatever time zone we need.
As of right now, this is
app/helpers/helpers.rb
.We shouldn't subtract an absolute value to get the data from UTC to whatever time zone we need.