Skip to content

Instantly share code, notes, and snippets.

Created October 2, 2014 17:09
What would you like to do?
Generate Time Zone Mapping
#!/usr/bin/env ruby
#encoding: utf-8
require 'active_support/all'
timezones = { |rails_name, name|
zone =
rails_name => {
offset: zone.utc_offset,
name: name,
}.reduce(:merge)"#{File.dirname(__FILE__)}/AndroidTimeZone+TCRails.json", 'w') { |file| file.write(timezones.to_json) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment