sissy
April 28th, 2005, 05:31 PM
hello there folks and how are we all.
seems like a great forum and clever bunch of people here also.
just recently started playing around with c# and really like it hope to get fairly good at it.
i have the following code which works and cant help wondering if theres a better easier way to do it or is what i have done exceptable?
string UTCOffset = TimeZone.CurrentTimeZone.GetUtcOffset(DateTime.Now).ToString();
UTCOffset = UTCOffset.Replace(":", "").Substring(0, 4);
Console.WriteLine("UTC offset: " + UTCOffset);
comments appreciated, many thanks.
seems like a great forum and clever bunch of people here also.
just recently started playing around with c# and really like it hope to get fairly good at it.
i have the following code which works and cant help wondering if theres a better easier way to do it or is what i have done exceptable?
string UTCOffset = TimeZone.CurrentTimeZone.GetUtcOffset(DateTime.Now).ToString();
UTCOffset = UTCOffset.Replace(":", "").Substring(0, 4);
Console.WriteLine("UTC offset: " + UTCOffset);
comments appreciated, many thanks.