How to use it
- Pick a date and time, or press Now.
- Choose the time zone that time belongs to. Your own zone is selected to start with.
- Add the cities you want to compare. The list is remembered in your browser.
Daylight saving time is applied automatically for the selected date, so a meeting in March or November shows the right local time.
Get the current time zone in code
JavaScript
Intl.DateTimeFormat().resolvedOptions().timeZone; // "Asia/Karachi"
PHP
echo date_default_timezone_get();
$now = new DateTime('now', new DateTimeZone('Europe/London'));
echo $now->format('Y-m-d H:i T');
Python
from datetime import datetime
from zoneinfo import ZoneInfo
print(datetime.now(ZoneInfo("Asia/Tokyo")))
Java
System.out.println(java.time.ZoneId.systemDefault());
System.out.println(java.time.ZonedDateTime.now(java.time.ZoneId.of("America/New_York")));
Always store times in UTC and convert to a zone only when you show them to someone. That avoids most daylight-saving bugs.