【发布时间】:2016-07-22 05:50:05
【问题描述】:
我的开发机器的文化是 en-NZ,我的时区设置为新西兰时间 (UTC+12:00)。位于美国西部的服务器上的 DateTime.TryParse 失败。
如何检查和更改服务器上我的网络应用程序的文化和时间设置?
-
我可以在服务器上以交互方式运行 Powershell 或 C# 代码并查看输出,只是为了测试一些东西,比如说
Console.WriteLine(CultureInfo.CurrentCulture.ToString());
如果您认为我的处理方式有误,欢迎提出任何其他想法。
【问题讨论】:
-
您是否使用 culter 参数测试了 datetime.tryparse?像这样 DateTime.TryParse(dateString,culture, styles,out dateResult)
标签: c# powershell datetime azure culture