Where's the DateTime 'Z' format specifier?

后端 未结 6 1450
抹茶落季
抹茶落季 2020-11-27 06:09

[Update: Format specifiers are not the same thing as format strings; a format specifier is a piece of a custom format string, where a format string is \

6条回答
  •  盖世英雄少女心
    2020-11-27 06:39

    I was dealing with DateTimeOffset and unfortunately the "o" prints out "+0000" not "Z".

    So I ended up with:

    dateTimeOffset.UtcDateTime.ToString("o")
    

提交回复
热议问题