-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathC# code
33 lines (27 loc) · 858 Bytes
/
C# code
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
//Run on visual vstudio
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
namespace clock
{
[Obsolete]
class Program
{
private static TimeZoneInfo India_Standard_Time = TimeZoneInfo.FindSystemTimeZoneById("Sri Lanka Time reagion:");
static void Main(string[] args)
{
int milliseconds = 1000;
while (!Console.KeyAvailable)
{
Console.WriteLine(DateTime.UtcNow.ToString("UT HH:mm:ss tt"));
Console.WriteLine(DateTime.Now.ToString("Srilanka HH:mm:ss tt"));
Console.WriteLine(TimeZoneInfo.Local.DisplayName);
Thread.Sleep(milliseconds);
Console.Clear();
}
}
}
}
//Thi is a simple application for usin C# to coumt time