mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
file: add doc on how to convert epoch seconds to datetime (#53357)
This commit is contained in:
@@ -181,6 +181,12 @@ EXAMPLES = r'''
|
||||
state: file
|
||||
modification_time: now
|
||||
access_time: now
|
||||
|
||||
- name: Set access time based on seconds from epoch value
|
||||
file:
|
||||
path: /etc/another_file
|
||||
state: file
|
||||
access_time: '{{ "%Y%m%d%H%M.%S" | strftime(stat_var.stat.atime) }}'
|
||||
'''
|
||||
RETURN = r'''
|
||||
|
||||
|
||||
Reference in New Issue
Block a user