I generate a report using a Jinja template file from one of my playbooks 
and mail that file to several users.  In it, I am putting the current date 
and time as follows:

Date generated: {{ now(false, '%m/%d/%Y %I:%M:%S') }}
---
{% for i in play_hosts | sort %}
Host: {{ i }}
      Rebooted: {{ hostvars[i]['rebooted']['rebooted'] }}
      Total reboot time: {{ hostvars[i]['rebooted']['elapsed'] }} seconds
---
{% endfor %}

When I get the email, the date is correct but the time is 7 hours off.  For 
example, the report was generated and mailed at 10:40:00am yesterday, but 
the time listed via the Jinja template above was 03:40:00.

Any ideas on how to get the time be in the current timezone?

Thanks,
Harry

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/8d957e26-0a8b-40bd-9dd4-f7b4f3297a29n%40googlegroups.com.

Reply via email to