Skip to content

Instantly share code, notes, and snippets.

@salomvary
Last active December 18, 2015 10:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save salomvary/5772724 to your computer and use it in GitHub Desktop.
Save salomvary/5772724 to your computer and use it in GitHub Desktop.
require 'active_support'
require 'json'
puts(
JSON.pretty_generate(
ActiveSupport::TimeZone.all.map do |tz|
{
:id => tz.tzinfo.identifier,
:name => tz.name,
:utc_offset => tz.utc_offset
}
end
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment