Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
= zip_to_timezone
{}[https://travis-ci.com/rgarver/zip_to_timezone]
This gem is designed to map US postal codes to the timezone. The timezone strings are based on ActiveSupport::TimeZone settings that include basic DST information. If used with Rails these timezones will handle DST changes on their own.
== Installation
gem install zip_to_timezone
If you are using bundler you can add a line to your Gemfile:
gem "zip_to_timezone"
== Usage
This is super simple to use:
ZipToTimezone.get_timezone_for('91304') # => "Pacific Time (US & Canada)"
== How it works
This uses Trei longest prefix matching to speed up the searching. This means that all zip codes that start with 90 will be in California and therefore are in Pacific Time. If I need to match on full zip codes in some states to differentiate timezones I can do that (eg: Kansas or Indiana) by just adding more specific entires.
== Note on accuracy
This gem combines two things that kind of suck to make them suck less. To do this though I had to make a lot of guesses. Please let me know if there are bad mappings so I can fix them. My data is imperfect and in some places outright wrong. The goal of the project was to handle the 95% case and hopefully grow it to be more accurate over time.
== References
== Note on Patches/Pull Requests
== Copyright
Copyright (c) 2009 Ryan Garver. See LICENSE for details.
FAQs
Unknown package
We found that zip_to_timezone demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.