Created
June 29, 2017 18:51
-
-
Save Warr1611/5a59bd119d504a2d54501c74bfa9a94f to your computer and use it in GitHub Desktop.
[Convert DateTime to TimeZone] Convert a DateTime to a TimeZone given the timeZoneIdentifier. #datetime #timezone #csharp
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
var timeZoneIdentifier = GetTimeZoneIdentifier(); // Get the appropriate timezoneidentifier from somewhere | |
var now = TimeZoneInfo.ConvertTimeBySystemTimeZoneId(DateTime.Now, timeZoneIdentifier); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment