win_timezone – Sets Windows machine timezone — Ansible Documentation

- AnsibleFest
- Products
- Community
- Webinars & Training
- Blog

Documentation

# win_timezone – Sets Windows machine timezone

- Synopsis
- Parameters
- Notes
- See Also
- Examples
- Return Values
- Status

## Synopsis

- Sets machine time to the specified timezone.

## Parameters

Parameter | Choices/Defaults | Comments
--- | --- | ---
timezone string / required |  | Timezone to set to. Example: Central Standard Time

## Notes

Note

- The module will check if the provided timezone is supported on the machine.
- A list of possible timezones is available from `tzutil.exe /l` and from https://msdn.microsoft.com/en-us/library/ms912391.aspx
- If running on Server 2008 the hotfix https://support.microsoft.com/en-us/help/2556308/tzutil-command-line-tool-is-added-to-windows-vista-and-to-windows-server-2008 needs to be installed to be able to run this module.

## See Also

See also

win_region – Set the region and format settings
  The official documentation on the win_region module.

## Examples

    - name: Set timezone to 'Romance Standard Time' (GMT+01:00)
      win_timezone:
        timezone: Romance Standard Time

    - name: Set timezone to 'GMT Standard Time' (GMT)
      win_timezone:
        timezone: GMT Standard Time

    - name: Set timezone to 'Central Standard Time' (GMT-06:00)
      win_timezone:
        timezone: Central Standard Time

## Return Values

Common return values are documented here, the following are the fields unique to this module:

Key | Returned | Description
--- | --- | ---
previous_timezone string | success | The previous timezone if it was changed, otherwise the existing timezone. Sample: Central Standard Time
timezone string | success | The current timezone (possibly changed). Sample: Central Standard Time

## Status

- This module is not guaranteed to have a backwards compatible interface. [preview]
- This module is maintained by the Ansible Community. [community]

### Authors

- Phil Schwartz (@schwartzmx)

Hint

If you notice any issues in this documentation, you can edit this document to improve it.