stefanluptak

stefanluptak

Hi all,

I am doing a Stripe integration and I would like to send a scheduled email to the customer. It should be scheduled to a given time of the day, but in his timezone.

I have a country code (ISO 3166-1 alpha-2) and a city of the customer. Those can be the inputs of a function. His approximate timezone should be the output.

Any ideas where to look? Thanks a lot.

Showing Posts 1 to 7

kartheek

kartheek

I know about these:

Any specific country/continent you are looking for ?

Marcus

Marcus

Maybe you can generate a mapping from the GeoNames data http://download.geonames.org/export/dump/readme.txt

stefanluptak

stefanluptak OP

Thanks a lot. I will take a look at those. Well, I am looking for all continents. :slight_smile:
I am aware, that there are countries with multiple timezones, in that case some average of those would be enough.

Maybe even something simple like this would be enough:

# SVK is Europe/Bratislava (in Slovakia)
# +1 is UTC offset in our country.
my_function("SVK") # +1
mathieuprog

mathieuprog

Check TzExtra and its TzExtra.countries_time_zones/1 function (it depends on Tz).

And GitHub - kimlai/tz_world: Resolve timezones from a location. · GitHub ?

kartheek

kartheek

Nice, no need to deal directly with external databases and mappings.

stefanluptak

stefanluptak OP

Thanks a lot. That is exactly what I need. :hugs:

— All posts loaded —

Where Next? Top

Trending in Questions Top

stjefim
Hello! Suppose you are building workflow (order / task / payment) processing system with the following requirements: Each workflow con...
New
water
I’m aware of 2 such projects, are there others? git: GitHub - team-alembic/realworld: A fullstack Phoenix LiveView application with back...
New
peck
Hi everyone. My team and I have been working on a fairly modest app based around video streaming and chat, but we’ve landed a customer t...
New
unaware8150
Hello folks! So at work, we are seeing some situations where we have to define some “fixed” strings that are used across the codebase in...
New
leoschweizer
Hi, we run different LLM models across a cluster, with each node loading a configurable subset. Model-specific queues let nodes consume ...
New
csmr
Hi all, I’m new here and would like to hear peoples views on my Elixir/Phoenix based game-engine! :smiley: Mutonex gamedesign was finish...
New
perzanko
Do we have maintainer of absinthe-graphql/dataloader here? We have a PR that we’d like to merge to the library. Relatively small additive...
New

Other Trending Topics Top

dominicletz
Hey there, I haven’t seen a list of useful Elixir specific skills for the popular AI tools yet so I’m starting one here with my first. ...
New
mudasobwa
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
KristerV
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New
budgie
I love Elixir. It’s one of 2 programming languages I’ve ever fallen in love with. But I don’t use it anymore. Serverless was the promis...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews