Commit f5ba0c61 by Michael DeHaan

Merge pull request #2248 from jpmens/iso8601

Add ISO8601 date/time format to setup
parents bd9c64e0 00bd5819
...@@ -307,6 +307,9 @@ class Facts(object): ...@@ -307,6 +307,9 @@ class Facts(object):
self.facts['date_time']['epoch'] = now.strftime('%s') self.facts['date_time']['epoch'] = now.strftime('%s')
self.facts['date_time']['date'] = now.strftime('%Y-%m-%d') self.facts['date_time']['date'] = now.strftime('%Y-%m-%d')
self.facts['date_time']['time'] = now.strftime('%H:%M:%S') self.facts['date_time']['time'] = now.strftime('%H:%M:%S')
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']['tz'] = time.strftime("%Z")
# User # User
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment