Skip to content

championswimmer/sharetime.zone

Repository files navigation

sharetime.zone

See time now at different timezones and share time with others easily.

Netlify Status

Features

The purpose of sharetime.zone is to make it easy to share time with others in different timezones.

Website

There are 2 main use cases:

  1. Check the time right now in a given time zone
  2. Convert time in a different timezone to your timezone
    • Visit https://sharetime.zone/IST/1200
    • This shows 12:00 PM in IST (India Standard Time) translated to your timezone
    • If you live in India, and want to say "Let's meet at 12:00 PM IST", you can share this link with your friend in a different timezone, and they will see the time translated to their timezone

cURL

Using Netlify's Edge Functions, cURL is supported. cURL requests are responded to extremely fast as it is processed at the edge, and your timezone is automatically detected from your request.

Behaviour is same as above.

# 1. Get time now 

❯ curl https://sharetime.zone/PST/now
Time right now in (PST) America/Los_Angeles is 04:10 AM
❯ curl https://sharetime.zone/KST/now
Multiple timezones found for (KST)
Time right now at Kaliningrad Standard Time (UTC+02:00) Kaliningrad is 02:10 PM
Time right now at Korea Standard Time (UTC+09:00) Seoul is 09:10 PM

# 2. Get specific time
❯ curl https://sharetime.zone/PST/1200
Your time: 1200 hrs in (PST) America/Los_Angeles will be 12:00 AM
❯ curl https://sharetime.zone/KST/1200
Multiple timezones found for (KST)
Your time: 1200 hrs in Kaliningrad Standard Time (UTC+02:00) Kaliningrad will be 02:00 PM
Your time: 1200 hrs in Korea Standard Time (UTC+09:00) Seoul will be 09:00 PM

NOTE: Netlify Edge processing, is obviously susceptible to wrong info if you are on a VPN. The website can correct itself with your local computer time. But cURL requests will be wrong if you are on a VPN.

Setup

Make sure to install the dependencies:

# npm
npm install

Development Server

Start the development server on http://localhost:3000

npm run dev

Production

Build the application for production:

npm run build

Locally preview production build:

npm run preview

Check out the deployment documentation for more information.