16
1
using System;
2
3
public class Program
4
{
5
public static void Main()
6
{
7
DateTime dt = new DateTime();
8
var info = TimeZoneInfo.FindSystemTimeZoneById("Pacific SA Standard Time");
9
DateTimeOffset localServerTime = DateTimeOffset.Now;
10
DateTimeOffset localTime= TimeZoneInfo.ConvertTime(localServerTime, info);
11
12
dt = localTime.DateTime;
13
Console.WriteLine(dt.ToString());
14
15
}
16
}
Cached Result
4/2/2025 12:03:36 PM