1

As far as I understood, UTC and GMT time should be same, even in daylight saving time applied.

So if you google "Current UTC time" and "Current GMT time", they both give you exact same number.

However, following conversion done shows one hour difference (I blame day light saving), however even if day light saving applied, they should show same time as when you google them as you see them exactly same. Please someone explain what's going on and what should be the correct time shown even when daylight saving applied.

        var utc = dateTime.ToUniversalTime();
        TimeZoneInfo zone = TimeZoneInfo.FindSystemTimeZoneById("GMT Standard Time");
        return TimeZoneInfo.ConvertTimeFromUtc(utc, zone);

utc: {6/27/2019 7:31:00 PM}

return value: {6/27/2019 8:31:00 PM}

swcraft
  • 2,014
  • 3
  • 22
  • 43
  • 1
    You are right, it is because of summer time. Info here https://www.timeanddate.com/time/zones/gmt – Anil Goel Jun 27 '19 at 19:44
  • 1
    This is a duplicate question https://stackoverflow.com/q/2292334/4708150 – TJ Rockefeller Jun 27 '19 at 20:27
  • 1
    It depends on the meaning of *"GMT"* in the particular context. That is, whether it refers to the current *local* time at Greenwich and other places within the same local time zone (which is currently *BST*, British Summer Time), or whether it refers to the actual GMT time zone abstractly (which is synonymous with Western European Time and UTC). – Steve Jun 27 '19 at 20:49

0 Answers0