简体   繁体   English

Windows Server 2012 r2 中的波斯文化

[英]Persian culture in Windows Server 2012 r2

In our development machine which is running on Windows 10, "fa-IR" culture works fine and all dates display using Persian calendar.在我们在 Windows 10 上运行的开发机器中,“fa-IR”文化运行良好,所有日期都使用波斯日历显示。 But when we deploy our app on Windows Server 2012 r2, datetime is still in Gregorian.但是当我们在 Windows Server 2012 r2 上部署我们的应用程序时,日期时间仍然是公历。

for clarification of the problem we have with fa-IR in Windows Server2012, here is an example that works fine in Windows 10 but do not work in Windows 2012:为了澄清我们在 Windows Server2012 中使用 fa-IR 的问题,这里是一个在 Windows 10 中运行良好但在 Windows 2012 中不起作用的示例:

DateTime startDate;
CultureInfo c = CultureInfo.CreateSpecificCulture("fa-IR");
DateTime.TryParse("1990/02/01", new CultureInfo("en-US"), DateTimeStyles.None, out startDate);
Console.WriteLine(startDate.ToString("D", c));

The Windows 10 result (fine): پنجشنبه, 12 بهمن 1368 Windows 10 结果(很好):پنجشنبه,12 بهمن 1368
The Windows 2012 result (just persian letters):پنجشنبه، 01 فوريه 1990 Windows 2012 结果(仅波斯字母):پنجشنبه، 01 فوريه 1990

It's most likely that the fr-IR culture is not installed on the server.最有可能的fr-IR区域性没有安装在服务器上。

See Installing more cultures on Windows Server 2012 for more help.有关更多帮助,请参阅在 Windows Server 2012 上安装更多文化

This depends on the version of Windows, Persian calendar was added in Windows Server 2012 R2 And Windows 10.这取决于 Windows 的版本,在 Windows Server 2012 R2 和 Windows 10 中添加了波斯日历。

SQL Server FORMAT with culture parameter not working带有文化参数的 SQL Server FORMAT 不起作用

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Windows Server 2012 R2上Windows Service Platform上的WCFNotSupportedException - WCF on Windows Service PlatformNotSupportedException On Windows Server 2012 R2 在 Windows Server 2012 R2 上构建的应用程序在 Windows Server 2008 R2 上失败 - Application built on Windows Server 2012 R2 fails on windows server 2008 R2 Windows Server 2012 R2上的意外崩溃WCF服务 - Unexpected crash WCF Service on Windows Server 2012 R2 Active Directory中的用户身份验证-Windows Server 2012 R2 - User Authentication in Active Directory - Windows Server 2012 R2 在Windows Server 2012 R2上发送http / 2请求 - send http/2 request on windows server 2012 R2 无法在 Windows 2012 R2 服务器上加载 DLL“tensorflow” - Unable to load DLL 'tensorflow' on Windows 2012 R2 Server 将 .net core 项目部署到 Windows Server 2012 r2 - Deploy .net core project to Windows Server 2012 r2 在Windows Server 2012 r2上部署时出现BadImageFormatException - BadImageFormatException when deploying on windows server 2012 r2 ServicePointManager.ServerCertificateValidationCallback无法在Windows Server 2012 R2上运行 - ServicePointManager.ServerCertificateValidationCallback not working on Windows Server 2012 R2 在Windows Server 2012 R2中无法使用DotRas拨号 - Can't dial with DotRas in Windows Server 2012 R2
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM