Incorrect timezone for Windows Server?

49 views
Skip to first unread message

ameya agashe

unread,
Oct 28, 2018, 6:24:24 PM10/28/18
to ansible...@googlegroups.com
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

ameya agashe

unread,
Oct 28, 2018, 8:16:56 PM10/28/18
to Ansible Project
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

Jordan Borean

unread,
Oct 29, 2018, 7:20:47 AM10/29/18
to Ansible Project
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

ameya agashe

unread,
Oct 29, 2018, 7:52:26 PM10/29/18
to ansible...@googlegroups.com
Thank you very much, Jordan! Yep, it's working perfectly fine now.

Kind regards
Ameya Agashe

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/325a267c-695d-4d56-8dd7-5545e2c8ee26%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages