Zone Settings. Auto Update Time Zone Async(TimeSpan) Method
Attempts to automatically determine and set the time zone for embedded mode devices.
public: static IAsyncOperation<AutoUpdateTimeZoneStatus> ^ AutoUpdateTimeZoneAsync(TimeSpan timeout);
/// [Windows.Foundation.Metadata.RemoteAsync] static IAsyncOperation<AutoUpdateTimeZoneStatus> AutoUpdateTimeZoneAsync(TimeSpan timeout);
[Windows.Foundation.Metadata.RemoteAsync] public static IAsyncOperation<AutoUpdateTimeZoneStatus> AutoUpdateTimeZoneAsync(System.TimeSpan timeout);
Public Shared Function AutoUpdateTimeZoneAsync (timeout As TimeSpan) As IAsyncOperation(Of AutoUpdateTimeZoneStatus)
If the time-out period is exceeded, this method returns a value of TimedOut for the AutoUpdateTimeZoneStatus.
The recommended time-out value is 60 seconds.
Windows 10 requirements
Windows 10, version 1809 (introduced in 10.0.17763.0)
Windows.System.SystemManagementContract (introduced in v6.0)
You can run this method at start up to set the time zone without prompting users for information.
This method does not necessarily change the time zone or find the correct time zone. For the results of the attempt, see the AutoUpdateTimeZoneStatus enumeration.
Separately, you can include a way for the user to set the time zone at a later time.
This method can use information from any of the following sources to determine the time zone:
- IP Address
If your device does not have access to any method of determining location, you should not run this method.