I am aware of the System.TimeZone class as well as the many uses of the DateTime.ToString() method. What I haven\'t been able to find is a way to convert a DateTime to a st
Use nodatime.
The following function takes a DateTime in UTC time and formats it with abbreviated local system timezone. Use x in format string for abbreviated timezone. Look for custom formatting here.
public static string ConvertToFormattedLocalTimeWithTimezone(DateTime dateTimeUtc)
{
var tz = DateTimeZoneProviders.Tzdb.GetSystemDefault(); // Get the system's time zone
var zdt = new ZonedDateTime(Instant.FromDateTimeUtc(dateTimeUtc), tz);
return zdt.ToString("MM'/'dd'/'yyyy' 'hh':'mm':'ss' 'tt' 'x", CultureInfo.InvariantCulture);
}