c# - How do I get GMT in this format +0100? -
i'm trying gmt in format of +0100, i'm getting +100. here's did far.
timezoneinfo localzone = timezoneinfo.local; string tz2 = string.format ("{0}{1}{2:00}", (localzone.baseutcoffset >= timespan.zero) ? "" : "-", math.abs(localzone.baseutcoffset.hours), math.abs(localzone.baseutcoffset.minutes));
change string format to:
"{0}{1:00}{2:00}"
Comments
Post a Comment