[英]How to use an UWP Application on Raspberry PI to set the SystemTime
I get an exception if i run this Code on a RPI with W10iotCore:如果我使用 W10iotCore 在 RPI 上运行此代码,则会出现异常:
Windows.System.DateTimeSettings.SetSystemDateTime(new DateTime(sometime));
like喜欢
System.UnauthorizedAccessException: Access is denied. System.UnauthorizedAccessException:访问被拒绝。
I understand this exception but how can I run this Code with the Access to change the DateTime of the System?我了解此异常,但如何使用 Access 运行此代码以更改系统的日期时间?
That means on the debug Version in VisualStudion (still on the rpi) and the Normal runtime Environment of the App.这意味着在 VisualStudion 中的调试版本(仍在 rpi 上)和应用程序的正常运行时环境。
The Background: I am Building a weatherstation with the possibility to not have an Internet connection.背景:我正在构建一个可能没有 Internet 连接的气象站。 For the time Setting I will use an DCF77 Receiver for setting the SystemTime on Startup or the updateability on clicking a Button.对于时间设置,我将使用 DCF77 接收器来设置启动时的 SystemTime 或单击按钮时的可更新性。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.