Public
Like
worldclock
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
A simple, interactive world clock web application that allows users to view the current time in different timezones around the world.
- 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
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.
index.html
- Main HTML file with the clock display and timezone selectorscript.js
- JavaScript to handle the clock functionality and timezone selectionstyle.css
- Additional CSS styles beyond Tailwindserver.js
- Server-side code to handle HTTP requests and serve the static files
- The application loads with the user's local timezone selected by default
- Users can select a different timezone from the dropdown menu
- The clock updates every second to show the current time in the selected timezone
- The date and timezone information are also displayed
- Add ability to save favorite timezones
- Add a dark mode toggle
- Add multiple clocks on the same page for comparison
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.