DateTime.Parse(“2012-09-30T23:00:00.0000000Z”) always converts to DateTimeKind.Local

后端 未结 5 1403
猫巷女王i
猫巷女王i 2020-11-30 02:06

I want to parse a string that represent a DateTime in UTC format.

My string representation includes the Zulu time specification which should indicate that the string

5条回答
  •  孤街浪徒
    2020-11-30 03:03

    You can use the following format for parser method: yyyy-MM-ddTHH:mm:ss.ffffffK

    This shall properly process time zone information at the end (starting from .NET 2.0).

    RE: ISO 8601

提交回复
热议问题