Add ISO8601 date/time format to setup

Zulu time and one with microseconds, useful for timestamping
  Add TZ
reviewable/pr18780/r1
Jan-Piet Mens 12 years ago
parent efe45aca53
commit 7a48b171f2

@ -307,6 +307,9 @@ class Facts(object):
self.facts['date_time']['epoch'] = now.strftime('%s')
self.facts['date_time']['date'] = now.strftime('%Y-%m-%d')
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

Loading…
Cancel
Save