请随意查看有关可用字符串的参考;像你问的那样直接回答你的问题:string time = DateTime.UtcNow.ToLocalTime().ToString("yyyy-MM-ddTHH:mm:sszzz");以防万一提供的链接中断;我已经包含了我的答案中使用的格式字符串的描述:dd - Provides a double digit day 01 - 31.HH - Provides a double digit hour 00 - 23.MM - Provides a double digit month 01 - 12.mm - Provides a double digit minute 00 - 59.ss - Provides a double digit second 00 - 59.yyyy - Provides a four digit year 0000 - 9999.zzz - Provides the hours and minutes offset from UTC.