using System;
using System.IO;
public class DirectoryUTCTime
{
public static void Main()
{
string n = @"C:\";
DateTime dtime1 = DateTime.Now;
Directory.SetCreationTime(n, dtime1);
Directory.SetLastAccessTimeUtc(n, dtime1);
Console.WriteLine("Creation Date: {0}", Directory.GetCreationTime(n));
Console.WriteLine("UTC creation Date: {0}", Directory.GetCreationTimeUtc(n));
Console.WriteLine("Last write time: {0}", Directory.GetLastWriteTime(n));
Console.WriteLine("UTC last write time: {0}", Directory.GetLastWriteTimeUtc(n));
Console.WriteLine("Last access time: {0}", Directory.GetLastAccessTime(n));
Console.WriteLine("UTC last access time: {0}", Directory.GetLastAccessTimeUtc(n));
DateTime dtime2 = DateTime.Now;
Directory.SetLastWriteTimeUtc(n, dtime2);
Console.WriteLine("Changed last write time: {0}", Directory.GetLastWriteTimeUtc(n));
}
}