Get date/time for specific region?
c#, datetime, region
Solution
If you know the timezone you want, you can use the `TimeZoneInfo` class. First get the `TimeZoneInfo` object for your desired timezone, then convert current time to that timezone:
var timezone = TimeZoneInfo.FindSystemTimeZoneById("Central America Standard Time");
var dateTime = TimeZoneInfo.ConvertTime(DateTime.Now, timezone);
Problem
How do I get `DateTime.Now` for specific region? I'm trying to get the current date in a foreign country, I'm looking for an easy way to achieve this. Note: I don't mind getting the value from an online server, I just don't want to spend too much dev-time for it.