Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我如何在 c# 中编写这个?红宝石代码:
Time.now.gmtime.strftime("%Y-%m-%dT%H:%M:%S")
我试过在网上找到一个转换器,但失败了。
DateTime.Now.ToString("YYYY-MM-ddTHH:mm:ss");
或者
DateTime.UtcNow.ToString("YYYY-MM-ddTHH:mm:ss");
DateTime.UtcNow.ToString("yyyy-MM-ddTHH:mm:ss");