# Incorrect timezone for Windows Server?

**URL:** <https://forum.ansible.com/t/incorrect-timezone-for-windows-server/28885>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [October 28, 2018, 10:24pm UTC](https://forum.ansible.com/t/incorrect-timezone-for-windows-server/28885 "2018-10-28T22:24:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ameya\_Agashe](https://avatars.discourse-cdn.com/v4/letter/a/54ee81/32.png) [@Ameya\_Agashe](https://forum.ansible.com/u/Ameya_Agashe)\
**Post date:** [October 28, 2018, 10:24pm UTC](https://forum.ansible.com/t/incorrect-timezone-for-windows-server/28885/1 "2018-10-28T22:24:01Z")

</div>

Hey Guys,

I have added a timezone task and maybe its buggy or maybe my logic is not quiet right. It is referring to Easter timezone instead of Daylight Timezone, yaml block below:

**- name: Set timezone to ‘A.U.S. Eastern Standard Time’ (GMT+10:00)**  
**win\_timezone:**  
**timezone: E. Australia Standard Time**

Now, in Melbourne, we have Daylight time zone but still, it’s pointing to Easter timezone. How to ensure that timezone is automatically detected? like Eastern or Daylight by OS? Surely Microsoft must be providing timezone data with base Windows Server 2016 I suppose?

Kindly advise.

Thank you very much.

Kind Regards,  
Ameya Agashe

---

<div class="post-metadata">

**Author:** ![Ameya\_Agashe](https://avatars.discourse-cdn.com/v4/letter/a/54ee81/32.png) [@Ameya\_Agashe](https://forum.ansible.com/u/Ameya_Agashe)\
**Post date:** [October 29, 2018, 12:16am UTC](https://forum.ansible.com/t/incorrect-timezone-for-windows-server/28885/2 "2018-10-29T00:16:56Z")

</div>

Hola!

I changed to Daylight Timezone and now getting errors as below:

FAILED! =\> {“changed”: false, “msg”: “The specified timezone: E. Australia Daylight Time isn’t supported on the machine.”, “previous\_timezone”: “E. Australia Standard Time”, “timezone”: “E. Australia Daylight Time”}

Yaml block:

- name: Set timezone to ‘A.U.S. Eastern Daylight Time’ (GMT+11:00)  
win\_timezone:  
timezone: E. Australia Daylight Time

My question, do I have to keep on changing yaml code every time when timezone changes from Eastern time to Daylight time?

Please advise

Kind Regards  
Ameya Agashe

---

<div class="post-metadata">

**Author:** ![jborean](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/jborean/32/1525_2.png) [@jborean](https://forum.ansible.com/u/jborean)\
**Post date:** [October 29, 2018, 11:20am UTC](https://forum.ansible.com/t/incorrect-timezone-for-windows-server/28885/3 "2018-10-29T11:20:47Z")

</div>

The error message you are receiving is saying ‘E. Australia Daylight Time’ is not valid timezone. You cna run ‘tzutil.exe /l’ to list all the available timezones. The easiest way to do this is to set your timezone manually and run ‘tzutil.exe /g’. I did this for you and the result for UTC+10 Canberra, Melbourne, Sydney is ‘AUS Eastern Standard Time’. So just change your task to

`

- name: Set timezone to A.U.S. Eastern Time (DST)  
win\_timezone:  
timezone: AUS Eastern Standard Time

`

DST is automatically adjusted for this timezone, if you wish to always have DST off but still set to Canberra, Melbourne, Sydney set timezone to ‘AUS Eastern Standard Time\_dstoff’.

Thanks

Jordan

---

<div class="post-metadata">

**Author:** ![Ameya\_Agashe](https://avatars.discourse-cdn.com/v4/letter/a/54ee81/32.png) [@Ameya\_Agashe](https://forum.ansible.com/u/Ameya_Agashe)\
**Post date:** [October 29, 2018, 11:52pm UTC](https://forum.ansible.com/t/incorrect-timezone-for-windows-server/28885/4 "2018-10-29T23:52:01Z")

</div>

Thank you very much, Jordan! Yep, it’s working perfectly fine now.

Kind regards  
Ameya Agashe
