Difference between UTC and GMT Standard Time in .NET

后端 未结 7 1025
臣服心动
臣服心动 2020-11-27 04:45

In .NET, the following statements return different values:

Response.Write(
  TimeZoneInfo.ConvertTime(
    DateTime.Parse("2010-07-01 5:30:00.000"),         


        
7条回答
  •  一个人的身影
    2020-11-27 05:42

    "GMT Standard Time" = UK Time (which will be GMT+0 in the winter or GMT+1 if it's the summer in the UK.)

    Basically if you want to convert UTC to UK time, use "GMT Standard Time"

    Plain old "GMT" (or Greenwich Mean Time) is more or less UTC, give or take a few milliseconds. It doesn't adjust for daylight saving in the UK so we've never had a use case for it.

    This has kind of been explained in a very long winded way by all the other answers, some of which are misleading or contradictory, hence I wanted to provide yet another answer in the hope it saves someone all the reading and confusion.

提交回复
热议问题