Project

timezonify

0.0
No commit activity in last 3 years
No release in over 3 years
There's a lot of open issues
Finds timezone for a specific time eg. Where is it 8 AM now ?
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 2.3.16
~> 1.5
>= 0
>= 0
 Project Readme

Timezonify Gem Version Build Status

Wanna hold the World Clock in your hands ?? Then its about "time" you use timezonify.

Supports

Ruby 1.8.7+, Rails 2.3.16+

Warning for 1.8.7 users : Use at your own risk as Ruby community has dropped support for 1.8.7

Installation

Add this line to your application's Gemfile:

gem 'timezonify'

And then execute:

$ bundle

Or install it yourself as:

$ gem install timezonify

Usage

If you want to find your current timezone then simply execute this

Timezonify::Timezone.local_zone #=> "GMT-05"

If you want to find the list of all countries falling in a specific timezone then execute this

Timezonify::Timezone.find_country_in_timezone("GMT+13") #=> ["Kiribati: Phoenix Islands", "New Zealand ('during Daylight Saving Time')", "Samoa", "South Pole ('during Daylight Saving Time')", "Tonga"]

If you want to find the timezone for a specific time then execute this

 Timezonify::Timezone.timezone_for_time('10:00 AM') #=> "GMT+03:30"

If you want to find the time in a specific timezone then execute this

Timezonify::Timezone.find_time_at("GMT+5:30") #=> Fri, 21 Feb 2014 11:59:18 IST +05:30

Contributing

  1. Fork it ( http://github.com//timezonify/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request