---
title: "TimeZone class in C#"  
description: "TimeZone class in C#"  
author: "Anonymous User"  
published: 2013-06-12  
updated: 2013-06-12  
canonical: https://www.mindstick.com/forum/1058/timezone-class-in-c-sharp  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# TimeZone class in C#

Can [anyone](https://www.mindstick.com/articles/23207/how-to-find-the-best-fit-job-for-anyone) provide me an example of TimeZone [class](https://www.mindstick.com/blog/165/generic-class-in-c-sharp)?

## Replies

### Reply by Vijay Shukla

Hey Ankit Singh!\
I will provide you some line of code below:-

\

```
class TimeZoneDemo{    static void Main()    {        Console.WriteLine("{0,-30}{1}", "Standard time name:",        TimeZone.CurrentTimeZone.StandardName);        Console.WriteLine("{0,-30}{1}", "Daylight saving time name:",        TimeZone.CurrentTimeZone.DaylightName);        Console.WriteLine("\n" + "{0,-30}{1:MM-dd-yyyy HH:mm}", "Current date and time:",        DateTime.Now);        Console.WriteLine("{0,-30}{1}", "Daylight saving time?",        TimeZone.CurrentTimeZone.IsDaylightSavingTime(DateTime.Now));        DateTime currentUTC = TimeZone.CurrentTimeZone.ToUniversalTime(DateTime.Now);        TimeSpan currentOffset = TimeZone.CurrentTimeZone.GetUtcOffset(DateTime.Now);        Console.WriteLine("{0,-30}{1:MM-dd-yyyy HH:mm}", "Coordinated Universal Time:",        currentUTC);        Console.WriteLine("{0,-30}{1}", "UTC offset:", currentOffset);        DaylightTime daylight =        TimeZone.CurrentTimeZone.GetDaylightChanges(DateTime.Now.Year);        Console.WriteLine("\nDaylight saving time for year {0}:", DateTime.Now.Year);        Console.WriteLine("{0:MM-dd-yyyy HH:mm} to " + "{1:MM-dd-yyyy HH:mm}, delta: {2}",        daylight.Start, daylight.End, daylight.Delta);        Console.ReadKey();    }}
```

And if you want to more knowledge about the TimeZone Class read this article


---

Original Source: https://www.mindstick.com/forum/1058/timezone-class-in-c-sharp

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
