Skip to content

Instantly share code, notes, and snippets.

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