更新时间:2023-02-22 12:31:04
可以使用以下方法检索系统时钟类型:
The system clock type can be retrieved using:
string clockType = Windows.System.UserProfile.GlobalizationPreferences.Clocks.FirstOrDefault();
这将返回字符串 24HourClock
如果 24 小时设置在设备设置中打开或 12HourClock
如果设置关闭.
This will return the string 24HourClock
if the 24 hour setting is on in the device settings or 12HourClock
if the setting is off.