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

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -