Difference between UTC and GMT Standard Time in .NET

In .NET, the following statements return different values:

Response.Write(
  TimeZoneInfo.ConvertTime(
    DateTime.Parse("2010-07-01 5:30:00.000"),
    TimeZoneInfo.FindSystemTimeZoneById("Pacific Standard Time"),
    TimeZoneInfo.FindSystemTimeZoneById("GMT Standard Time"))
  );
// displays 7/1/2010 1:30:00 PM

..and this...

Response.Write(
  TimeZoneInfo.ConvertTime(
    DateTime.Parse("2010-07-01 5:30:00.000"),
    TimeZoneInfo.FindSystemTimeZoneById("Pacific Standard Time"),
    TimeZoneInfo.FindSystemTimeZoneById("UTC"))
  );
// displays 7/1/2010 12:30:00 PM

Why is this? I thought UTC and GMT Standard Time are equivalent.


Update

Upon further testing, I find that the following appear to be equivalent:

"UTC"

"Greenwich Mean Time"

"Morocco Standard Time"

Whereas, the following is different during summer months:

"GMT Standard Time"

Perhaps my question should be, why are "Greenwich Mean Time" and "GMT Standard Time" different?

End Update


GMT does not adjust for Daylight saving time (DST). You can hear it from the horse's mouth on this web site.

Add this line of code to see the source of the problem:

  Console.WriteLine(TimeZoneInfo.FindSystemTimeZoneById("GMT Standard Time").SupportsDaylightSavingTime);

Output: True.

This is not a .NET problem, it is Windows messing up. The registry key that TimeZoneInfo uses is HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\GMT Standard Time. You'd better stick with UTC.


[I am really just backing up Hans Passant's answer]

There seems to me to be a confusion over the use of the term "GMT" which seems to be used to mean "Greenwich Mean Time" and also the timezone used in the UK/Ireland - which flips between GMT in winter and British Summer time in summer and doesn't seem to have a well defined name in its own right!

To confuse things even more, I ran the sample code from the MSDN docs for TimeZoneInfo.GetSystemTimeZones and looked at the output.

I was very surprised to see the following definition of the "GMT Standard Time" timezone

ID: GMT Standard Time
   Display Name:  (UTC) Dublin, Edinburgh, Lisbon, London
   Standard Name:                       GMT Standard Time
   Daylight Name:                       GMT Daylight Time   ***Has Daylight Saving Time***
   Offset from UTC:                       0 hours, 0 minutes
   Number of adjustment rules:                          1
   Adjustment Rules:
      From 01/01/0001 00:00:00 to 31/12/9999 00:00:00
      Delta: 01:00:00
      Begins at 01:00 on Sunday of week 5 of March
      Ends at 02:00 on Sunday of week 5 of October

It seems (at least to me) that whoever was in charge of defining timezones in Microsoft has really muddied the waters even further here.

They obviously wanted to describe the timezone in use in UK/Ireland but they gave it an ID that included the terms "GMT" and UTC in the ID and the display name. I feel fairly confident that this timezone definition (whatever it should be called) is not UTC. It may have times that are very similar to UTC for half of the year but that is all!


This is a late response that the original questioner is unlikely to read but which people who google for this topic may find.

The names GMT Standard Time and GMT Daylight Time are unknown outside of Redmond. They are mythical animals that appear only in the bestiary called the Windows Registry. In the real world, in winter the UK observes GMT (Greenwich Mean Time) and in summer it observes BST (British Summer Time). BST is 1 hour ahead (eastwards) of GMT. Europeans generally do not talk about "daylight time" but "summer time", at least in the languages I know.

One respondent has said one should use UTC in preference to GMT. This advice, from the International Astronomical Union, dates back to 1935. Its point was that, before 1925, GMT was counted from noon not midnight, so even though it was 10 years later, the possibility of ambiguity might still have then persisted. But it's a bit out of date now. For the past 80 years the terms GMT and Universal Time have been almost synonymous. Not quite, of course. But you need an astronomer to explain the difference to you. If you are concerned about hours, not seconds, you probably won't care.

GMT is about civil timekeeping in English-speaking countries. It is not obsolete. It is enshrined in law in the UK, Ireland, Canada, even Belgium.

The various flavours of Universal Time are about astronomical timekeeping.

And civil timekeeping, I think, was what the original question was about.