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
posted @ 2021-07-01 11:45  b̶i̶n̶g̶.̶  阅读(108)  评论(0编辑  收藏  举报