Skip to content
Programming

Time Zone Converter

Convert a date and time between time zones, with daylight saving handled for you. Add the cities you work with and see their local time at a glance.

  • Free
  • No sign-up
  • Runs in your browser

Time Zone Converter

runs on your device

    How to use it

    1. Pick a date and time, or press Now.
    2. Choose the time zone that time belongs to. Your own zone is selected to start with.
    3. 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.

    Go deeper

    Programming

    How to get time zone in different programming languages?

    Today in this topic we'll cover how you can get time zone in different programming languages. Get Timezone in PHP The function that is being used in PHP to get timezone i…