This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Threading; | |
namespace ConsoleApplication3 { | |
class Program { | |
static void Main(string[] args) { | |
Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US"); | |
Thread.CurrentThread.CurrentTimeZone = TimeZoneInfo.FindSystemTimeZoneById("Mountain Standard Time"); | |
DateTime postedDk = new DateTime(2016, 12, 17, 6, 28, 0, DateTimeKind.Local); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Threading; | |
namespace ConsoleApplication3 { | |
class Program { | |
static void Main(string[] args) { | |
Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US"); | |
DateTime postedDk = new DateTime(2016, 12, 17, 6, 28, 0, DateTimeKind.Local); | |
DateTime postedUtc = TimeZoneInfo.ConvertTime(postedDk, TimeZoneInfo.Local, TimeZoneInfo.Utc); |