World Clock

A simple, interactive world clock web application that allows users to view the current time in different timezones around the world.

Features

  • Display current time and date
  • Select from a wide range of timezones organized by region
  • Real-time clock updates
  • Responsive design that works on mobile and desktop
  • Visual feedback when time updates

Implementation Details

This project is built with:

  • Vanilla JavaScript (no frameworks)
  • Tailwind CSS for styling (via CDN)
  • HTML5

The application uses the browser's built-in Date object and Intl.DateTimeFormat API to handle timezone conversions and formatting.

File Structure

  • index.html - Main HTML file with the clock display and timezone selector
  • script.js - JavaScript to handle the clock functionality and timezone selection
  • style.css - Additional CSS styles beyond Tailwind
  • server.js - Server-side code to handle HTTP requests and serve the static files

How It Works

  1. The application loads with the user's local timezone selected by default
  2. Users can select a different timezone from the dropdown menu
  3. The clock updates every second to show the current time in the selected timezone
  4. The date and timezone information are also displayed

Future Improvements

  • Add ability to save favorite timezones
  • Add a dark mode toggle
  • Add multiple clocks on the same page for comparison

Feature Branches

Map Visualization (In Progress)

A feature branch is in progress to add a map visualization of the selected timezone. This feature:

  • Shows an interactive map that highlights the selected timezone location
  • Updates the map view when a different timezone is selected
  • Provides a visual context for the time differences

To test this feature:

  • Access the application with ?map=true parameter
  • Or navigate to /map endpoint

See MAP-FEATURE-README.md for more details.