DateTime.Now 在.netcore下的格式问题
作者:互联网
public static void Main(string[] args) { CultureInfo.DefaultThreadCurrentCulture = new CultureInfo("zh-CN", true) { DateTimeFormat = { ShortDatePattern = "yyyy-MM-dd", FullDateTimePattern = "yyyy-MM-dd HH:mm:ss", LongTimePattern = "HH:mm:ss" } }; CreateHostBuilder(args).Build().Run(); }
原文链接:https://blog.csdn.net/shanghaimoon/article/details/116122021
标签:CultureInfo,netcore,ss,dd,args,DateTime,yyyy,HH,Now 来源: https://www.cnblogs.com/gaobing/p/14958136.html