Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
00bd5819
Commit
00bd5819
authored
Mar 01, 2013
by
Jan-Piet Mens
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add ISO8601 date/time format to setup
Zulu time and one with microseconds, useful for timestamping Add TZ
parent
bd9c64e0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
library/setup
+3
-0
No files found.
library/setup
View file @
00bd5819
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment