69
1
using System;
2
3
public class Program
4
{
5
public static void Main()
6
{
7
DateTime specifiedTime = new DateTime(2017, 04, 02, 18, 51, 00);
8
DateTime now = DateTime.Now;
9
10
string timeName = null;
11
try
12
{
13
// specify the TimeZone we're wanting to validate against
14
TimeZoneInfo zone = TimeZoneInfo.FindSystemTimeZoneById("New Zealand Standard Time");
15
16
// check whether the selected TimeZone is subject to Daylight Savings Time; assign correct name to the zone
17
if (zone.IsDaylightSavingTime(specifiedTime))
18
{
19
timeName = zone.DaylightName;
20
}
21
else
22
{
23
timeName = zone.StandardName;
24
}
Cached Result
Found 5 users online
Found 5 users offline
Found bates when count is 1: 1
PropertyName: Name
PropertyName: Online
Found 5 users offline
Found bates when count is 1: 1
PropertyName: Name
PropertyName: Online