I am using prayer webpart i need to show the prayer time based on local time zone of country
how to get local time zone using c#
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Rajeesh MenothRank #118 · 18.4K reputationPosted Aug 20, 2015, 8:29 PM EDT
Sumit JoshiRank #1,252 · 1.4K reputationPosted Aug 20, 2015, 9:32 PM EDT
const string dataFmt = "{0,-30}{1}";
const string timeFmt = "{0,-30}{1:MM-dd-yyyy HH:mm}";
TimeZone curTimeZone = TimeZone.CurrentTimeZone;
// What is TimeZone name?
Console.WriteLine( dataFmt, "TimeZone Name:", curTimeZone.StandardName );
Vaikesh K PRank #808 · 2.8K reputationPosted Aug 20, 2015, 11:37 PM EDT
Sumit JoshiRank #1,252 · 1.4K reputationPosted Aug 20, 2015, 11:41 PM EDT