formatter-date
Format Time/DateTime with time zone offset

Installation
Add this line to your application's Gemfile:
gem 'formatter-date'
And then execute:
$ bundle
Or install it yourself as:
$ gem install formatter-date
Usage
formatter = Formatter::Date.new('Asia/Karachi')
formatter.format(Time.now)
formatter = Formatter::Date.new('Asia/Karachi', :jisx0301)
formatter.format(Time.now)
formatter = Formatter::Date.new('Asia/Karachi', :iso8601, 2)
formatter.format(Time.now)
formatter = Formatter::Date.new('Asia/Karachi', '%FT%T%:z')
formatter.format(Time.now)
formatter.identifier
formatter.offset
Contributing
- Fork it ( https://github.com/terlar/formatter-date/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request