pdamoc
I need to translate a time that I have in a known timezone to a time in a location for which I know the city and zipcode.
Is there a library that already does this?
If not is there a free online service/API that could be used to solve this?
If not, how do you suggest to approach this task?
The cities are all in USA but I don’t live in USA. Maybe there is some official database that I can use.
Trending in Questions
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
Hi everyone,
I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding.
I sta...
New
Hello,
I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
Documentation
While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
I’m new to elixir and just tried to install the elixirLS extension for VScode(ium) and it is throwing some errors that I would like help ...
New
Other Trending Topics
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #ai
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #elixirconf-eu
- #metaprogramming
- #hex










Showing Posts 1 to 8- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
andrewb
Hi,
I ended up using the Google Maps API and having a field for user to search for their City. I then extracted the timezone and other location data I needed.
I could not find a reliable alternative.
If this is an option let me know and I can post some code (However it is just javascript on the client as per the docs).
Andrew
PS: not free but low cost
hauleth
You can use GeoNames to fetch position from the zip code, however I wouldn’t rely on that too much, because people can use different TZ than their “local” one (for example they are dealing with customers in different TZ, and it is easier for them to use TZ of the client). So I would rather ask - what for you need that?
tme_317
I have found this data (which I use in my project) to be accurate and relatively low cost: ZIP code database with time zone, daylight saving time, area code, county, county FIPS code, ZIP code type, city and state for every 5-digit ZIP code
Google maps API could work but check the cost/TOS restrictions.
pdamoc
It is exactly one of these solutions that we’re implementing. Our app should display the time in the TZ of the client.
Thank you all for the suggestions. I will propose these solutions to my contact.
kip
The tz_world packages translates a geo point (a location with a lat, lng) into a timezone using map data from osm and timezone data from iana. So if you can translate a place into a location (with geonames for example), then
tz_worldwill give you the timezone name. Its very cool.Note that
tz_dataon hex requires ecto and postgres with postgis, but the master branch on GitHub does not and the author has indicated he will publish that version to hex this week.pdamoc
This is very useful information. I already have
tz_worldinstalled as a dependency oftimex.mindok
timeanddate.com has an API: https://www.timeanddate.com/services/api/time-api.html (not free). Their main timezone page allows you to lookup by name or just zipcode so I would assume their API would too.
No affiliation - just used their meeting planner a lot in a previous life.
tme_317
I don’t know how up-to-date this is but I found this free data including zips, timezones, and lat/long: https://public.opendatasoft.com/explore/dataset/us-zip-code-latitude-and-longitude/table/ Note the city name here is the “primary city name” of the given zip which is probably not good enough as multiple cities/town names can exist in a given zip.
Zips do change over time so the inexpensive (non-free) resource I sent over the other day updates changes from the authoritative USPS monthly if needed and does include all the “alternate” city names per zip.
Finally, for the purpose of city/town/hamlet name to lat/long (if using
tz_worldsolution to get timezone) nothing beats the free USGS GNIS data: https://www.usgs.gov/core-science-systems/ngp/board-on-geographic-names/download-gnis-data