Sha256: b76257134e542b843b23f69473d64e721b0f7ccef19d743ca6814652ddac75c4
Contents?: true
Size: 406 Bytes
Versions: 28
Compression:
Stored size: 406 Bytes
Contents
class TimepieceController < ApplicationController respond_to :json def clock arr = Array.new params[:timezones].each_with_index do | data, index | zone = Time.now.in_time_zone(data) time = { :hours => zone.strftime('%H'), :minutes => zone.strftime('%M'), :seconds => zone.strftime('%S') } arr << time end render :json => arr end end
Version data entries
28 entries across 28 versions & 1 rubygems