Git Product home page Git Product logo

tzip's People

Contributors

farski avatar mattgillooly avatar michaelkirk avatar smcpherson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

tzip's Issues

Feature request: output tzinfo compatible zone names

It's great that TZip allows you to assign the output of #find_by_zipcode to config.time_zone.

But for those of us working in Ruby only environments (non-rails) it would be nifty if TZip could produce names suitable for assigning to ENV[TZ]. For example, "Pacific Time (US & Canada)" would be "US/Pacific". Etc.

This would allow something like:

ENV['TZ'] = TZip::tz_from_zipcode(90266)

find_by_zipcode missing 37212 Nashville, TN

Steps to reproduce

irb(main):001:0> ActiveSupport::TimeZone.find_by_zipcode('37212')
=> nil

Expected behavior

irb(main):001:0> ActiveSupport::TimeZone.find_by_zipcode('37212')
=> "Central Time (US & Canada)"

Actual behavior

irb(main):001:0> ActiveSupport::TimeZone.find_by_zipcode('37212')
=> nil

System configuration

Rails version: Rails 5.0.0.1

Ruby version: ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin16]

find_by_zipcode missing 8628 Trenton, NJ

Steps to reproduce

pry(main)> ActiveSupport::TimeZone.find_by_zipcode('8628')
=> nil

Expected behavior

pry(main)> ActiveSupport::TimeZone.find_by_zipcode('8628')
=> "Eastern Time (US & Canada)"

Actual behavior

pry(main)> ActiveSupport::TimeZone.find_by_zipcode('8628')
=> nil

System configuration

Rails version: Rails 5.0.6
Ruby version: ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-darwin16]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.