mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Adds seconds to backup timestamp
This commit is contained in:
parent
ed891c76f6
commit
1e865368ac
1 changed files with 2 additions and 2 deletions
|
@ -1268,8 +1268,8 @@ class AnsibleModule(object):
|
||||||
|
|
||||||
def backup_local(self, fn):
|
def backup_local(self, fn):
|
||||||
'''make a date-marked backup of the specified file, return True or False on success or failure'''
|
'''make a date-marked backup of the specified file, return True or False on success or failure'''
|
||||||
# backups named basename-YYYY-MM-DD@HH:MM~
|
# backups named basename-YYYY-MM-DD@HH:MM:SS~
|
||||||
ext = time.strftime("%Y-%m-%d@%H:%M~", time.localtime(time.time()))
|
ext = time.strftime("%Y-%m-%d@%H:%M:%S~", time.localtime(time.time()))
|
||||||
backupdest = '%s.%s' % (fn, ext)
|
backupdest = '%s.%s' % (fn, ext)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue