TimeZoneSettings.AutoUpdateTimeZoneAsync(TimeSpan) Method


Attempts to automatically determine and set the time zone for embedded mode devices.

 static IAsyncOperation<AutoUpdateTimeZoneStatus> ^ AutoUpdateTimeZoneAsync(TimeSpan timeout);
/// [Windows.Foundation.Metadata.RemoteAsync]
 static IAsyncOperation<AutoUpdateTimeZoneStatus> AutoUpdateTimeZoneAsync(TimeSpan const& timeout);
public static IAsyncOperation<AutoUpdateTimeZoneStatus> AutoUpdateTimeZoneAsync(System.TimeSpan timeout);
function autoUpdateTimeZoneAsync(timeout)
Public Shared Function AutoUpdateTimeZoneAsync (timeout As TimeSpan) As IAsyncOperation(Of AutoUpdateTimeZoneStatus)


TimeSpan TimeSpan

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 requirements

Device family
Windows IoT Extension SDK (introduced in 10.0.17134.0)
API contract
Windows.System.SystemManagementContract (introduced in v5.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:

  • GPS
  • Cellular
  • Wi-Fi
  • IP Address

If your device does not have access to any method of determining location, you should not run this method.

Applies to

See also