0

does a function that return to me the actual GMT shift exist? Like, in France its actually GMT+02. So it would return : +02

Tried with some function such as

DateTime.UtcNow; 

So yea i could compare the UTC time to my actual time to get the GMT+x but if something that do it automaticly exist i'll take it

DiSiZ
  • 43
  • 10
  • you want to look at the TimeZoneInfo class https://learn.microsoft.com/en-gb/dotnet/api/system.timezoneinfo?view=netframework-4.7.2 – Dave Jun 14 '18 at 14:57
  • `TimeZoneInfo.GetUtcOffset` might be what you're looking for. Check the code sample in https://msdn.microsoft.com/en-us/library/bb396378(v=vs.110).aspx – Rui Jarimba Jun 14 '18 at 14:59
  • See duplicate and this: `var gmt = TimeZoneInfo.FindSystemTimeZoneById("GMT Standard Time");` – DavidG Jun 14 '18 at 15:00

0 Answers0