Convert DataTime time zone number into text value like: EST

658 views Asked by At

I am looking for a way to output/format

String.Format("{0:h:MMtt zzzz}", symbol.QuoteData.LastTrade);

into more meaningful format like

String.Format("{0:h:MMtt EST}", symbol.QuoteData.LastTrade);
1

There are 1 answers

1
Myles McDonnell On

Take a look at the TimeZoneInfo class (assuming you are .NET 3.5 or later?). The first thing to note is that there is no definitive list of 3 char time zone mnemonics, as far as I know of anyway. If have seen lists online, but they all contain duplicates! I realize this answer is a bit vague. If you can give more detail I'll try to be more specific.