mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
Added ['date_time']['tz_offset'] using %z to get the time offset rather than time zone.
This commit is contained in:
@@ -452,6 +452,7 @@ class Facts(object):
|
|||||||
self.facts['date_time']['iso8601_micro'] = now.utcnow().strftime("%Y-%m-%dT%H:%M:%S.%fZ")
|
self.facts['date_time']['iso8601_micro'] = now.utcnow().strftime("%Y-%m-%dT%H:%M:%S.%fZ")
|
||||||
self.facts['date_time']['iso8601'] = now.utcnow().strftime("%Y-%m-%dT%H:%M:%SZ")
|
self.facts['date_time']['iso8601'] = now.utcnow().strftime("%Y-%m-%dT%H:%M:%SZ")
|
||||||
self.facts['date_time']['tz'] = time.strftime("%Z")
|
self.facts['date_time']['tz'] = time.strftime("%Z")
|
||||||
|
self.facts['date_time']['tz_offset'] = time.strftime("%z")
|
||||||
|
|
||||||
|
|
||||||
# User
|
# User
|
||||||
|
|||||||
Reference in New Issue
Block a user