C# Program for Timezoneinfo.supportsdaylightsavingtime Property

You are currently viewing C# Program for Timezoneinfo.supportsdaylightsavingtime Property

C# program for TimeZoneInfo.SupportsDaylightSavingTime Property

using System;
using System.Globalization;
using System.Collections.ObjectModel;

class TimeZoneInfoDemo
{
    //Entry point of Program
    static public void Main()
    {
        ReadOnlyCollection<TimeZoneInfo> timeZones;

        timeZones = TimeZoneInfo.GetSystemTimeZones();

        Console.WriteLine("Supported daylight saving time:");
        foreach (TimeZoneInfo timeZone in timeZones)
        {
            if (!timeZone.SupportsDaylightSavingTime)
                Console.WriteLine("\t"+timeZone.DisplayName);
        }
    }
}
Supported daylight saving time:
        (UTC-12:00) International Date Line West
        (UTC-11:00) Midway Island, Samoa
        (UTC-10:00) Hawaii
        (UTC-07:00) Arizona
        (UTC-06:00) Central America
        (UTC-06:00) Saskatchewan
        (UTC-05:00) Bogota, Lima, Quito
        (UTC-05:00) Indiana (East)
        (UTC-04:30) Caracas
        (UTC-04:00) Georgetown, La Paz, San Juan
        (UTC-03:00) Cayenne
        (UTC-01:00) Cape Verde Is.
        (UTC) Coordinated Universal Time
        (UTC) Monrovia, Reykjavik
        (UTC+01:00) West Central Africa
        (UTC+02:00) Harare, Pretoria
        (UTC+03:00) Kuwait, Riyadh
        (UTC+03:00) Nairobi
        (UTC+03:00) Tbilisi
        (UTC+04:00) Abu Dhabi, Muscat
        (UTC+04:30) Kabul
        (UTC+05:00) Tashkent
        (UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi
        (UTC+05:30) Sri Jayawardenepura
        (UTC+05:45) Kathmandu
        (UTC+06:00) Astana, Dhaka
        (UTC+06:30) Yangon (Rangoon)
        (UTC+07:00) Bangkok, Hanoi, Jakarta
        (UTC+08:00) Beijing, Chongqing, Hong Kong, Urumqi
        (UTC+08:00) Kuala Lumpur, Singapore
        (UTC+08:00) Taipei
        (UTC+09:00) Osaka, Sapporo, Tokyo
        (UTC+09:00) Seoul
        (UTC+09:30) Darwin
        (UTC+10:00) Brisbane
        (UTC+10:00) Guam, Port Moresby
        (UTC+11:00) Magadan, Solomon Is., New Caledonia
        (UTC+12:00) Fiji, Marshall Is.
        (UTC+13:00) Nuku'alofa
Press any key to continue . . .

Ranjith Kumar

Hi, I'm Ranjith a full-time Blogger, YouTuber, Affiliate Marketer, & founder of Coding Diksha. Here, I post about programming to help developers.

Leave a Reply