It's always 5 o'clock somewhere. This app finds exactly where.
The Concept
A simple idea executed beautifully: at any given moment, there's a place on Earth where it's cocktail hour. This app finds that place, shows you a gorgeous photo, and gives you a drink recipe to match.
How It Works
The app tracks 26 locations around the globe, from Honolulu to Auckland, covering every timezone. When you visit, it calculates which location is currently in the 5-6 PM window and displays:
- The Location - City name and country
- Beautiful Imagery - Full-viewport background photo from Unsplash
- Local Time - Current time at that location
- Signature Cocktail - A drink that's quintessential to that region
Featured Locations & Drinks
Each location is paired with a culturally appropriate cocktail:
- Honolulu - Mai Tai (rum, lime, orgeat, curacao)
- Tokyo - Highball (whisky, soda, precision ice)
- Bangkok - Thai Iced Tea Cocktail (rum, thai tea, condensed milk)
- Mumbai - Mango Lassi Martini (vodka, mango, yogurt)
- Paris - French 75 (gin, champagne, lemon, sugar)
- Rio de Janeiro - Caipirinha (cachaca, lime, sugar)
- New York - Manhattan (rye, sweet vermouth, bitters)
- Auckland - Kiwi Crush (vodka, kiwi, lime, mint)
- ...and 18 more locations worldwide
Recipe Details
Each cocktail includes:
- Complete ingredient list with measurements
- Step-by-step preparation instructions
- Glassware recommendations
- Garnish suggestions
- Brief history or cultural context
Auto-Refresh
Leave the page open and it automatically updates every 5 minutes. Watch as cocktail hour travels around the world. Perfect for a bar display or conversation piece.
No Account Required
Just visit the site. No login, no tracking, no cookies. Share the link with friends and they'll see the same thing you see.
A lightweight web application demonstrating timezone calculations, external API integration, and minimalist architecture.
The Core Algorithm
Finding 'where it's 5 PM' is trickier than it sounds. The algorithm:
from zoneinfo import ZoneInfo
from datetime import datetime
def find_five_oclock_location(locations: list[Location]) -> Location:
now_utc = datetime.now(ZoneInfo('UTC'))
for location in locations:
local_time = now_utc.astimezone(ZoneInfo(location.timezone))
hour = local_time.hour
# Check if within the 5 PM window (configurable)
if 17 <= hour < 18: # 5:00 PM - 5:59 PM
return location
# Fallback: find closest to 5 PM
return min(locations, key=lambda loc: abs(17 - get_hour(loc)))
Why zoneinfo over pytz? - Python 3.9+ includes zoneinfo in stdlib. It uses the system's IANA timezone database, stays current with DST changes, and has cleaner semantics than pytz.
Data Model
Location Schema:
class Location(AppModel):
id: str
city: str
country: str
timezone: str # IANA identifier like 'America/New_York'
unsplash_id: str # Photo ID for background
drink_id: str # Reference to drinks.json
latitude: float
longitude: float
Drink Schema:
class Drink(AppModel):
id: str
name: str
ingredients: list[Ingredient]
instructions: list[str]
glass: str
garnish: str | None
history: str
API Design
Single endpoint, dead simple:
GET /api/location
Response:
{
"location": {
"city": "Tokyo",
"country": "Japan",
"local_time": "17:23",
"image_url": "https://unsplash.com/..."
},
"drink": {
"name": "Highball",
"ingredients": [...],
"instructions": [...]
}
}
Fully stateless - no sessions, no cookies, no authentication. The same URL always returns the current 5 o'clock location.
Frontend Implementation
Image Loading - Unsplash Source API for dynamic sizing:
const imageUrl = `https://source.unsplash.com/${photoId}/${width}x${height}`;
Auto-Refresh - setInterval polling every 5 minutes:
setInterval(async () => {
const data = await fetch('/api/location').then(r => r.json());
updateUI(data);
}, 5 * 60 * 1000);
Smooth Transitions - CSS fade between backgrounds to avoid jarring changes when the location updates.
Edge Cases Handled
- No exact match - Falls back to closest timezone to 5 PM
- DST transitions - zoneinfo handles automatically
- Half-hour timezones - Included locations like India (UTC+5:30)
- International Date Line - Properly wraps around