Socket
Book a DemoInstallSign in
Socket

timezonify

Package Overview
Dependencies
Maintainers
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

timezonify

0.0.2
bundlerRubygems
Version published
Maintainers
5
Created
Source

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

  • Fork it ( http://github.com//timezonify/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 new Pull Request

FAQs

Package last updated on 21 Feb 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.