Inspiration
As someone who often schedules meetings across time zones, I thought, wouldn't it be nice if I could ask Alexa what time it is in any city in the world?
What it does
Ask Alexa a simple question, like "what time is it in Tokyo?", and she will respond in a human-friendly way. Instead of saying "Saturday 13:15", she will say "It is Saturday, quarter past one in the afternoon in Tokyo right now".
The skill also allows Alexa to tell you the time difference between two places. If you ask "What is the time difference between Cape Town and London?", she will respond with "Cape Town is 2 hours ahead of London".
How I built it
I used the brilliant flask-ask library to build this skill, and zappa to deploy to AWS Lambda. Hats off to all the authors involved. To get the timezone for a specific user-specified location, I currently use a combination of various Google APIs.
Challenges I ran into
For one thing, I don't own an Echo. This made it hard to test, since the given testing tools are quite limited.
Alexa's built-in City slots do not support a whole lot of cities. I tried to combine various different slots, like US_City, GB_City, Europe_City, etc, but even with all this, it would fail to parse a question containing big world cities like Cape Town or Tokyo. The solution was to make a custom slot, called WorldCity, that contains a list of about 2000 cities with international airports or a population above 300,000. This solved the problem, and the skill now supports every important city in the world.
Accomplishments that I'm proud of
This is my first Alexa skill, and I got it published without having my own Echo to test it on. Hopefully for my next skill that won't be necessary!
What I learned
Building for a voice-interface is completely different to building for a screen. The hardest part is letting the user know what they are able to do - discoverability in a voice-enabled app is very low. Nevertheless, it is in many ways also simpler to build for voice-only, because you can focus more on functionality and less on looks.
What's next for Timezone for Alexa
I would like to add the ability to compare places against your current location (saying "here") - but that might require asking the user for this information the first time.

Log in or sign up for Devpost to join the conversation.