From d000c66895f2fee9ed0e1d9a31aaf61f83796e43 Mon Sep 17 00:00:00 2001 From: RYAN CHETCUTI Date: Wed, 1 Nov 2023 09:30:01 +0000 Subject: [PATCH] FIX(cv_tag_v3): Format datetime with padding 0 --- .../arista/cvp/plugins/module_utils/tag_tools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible_collections/arista/cvp/plugins/module_utils/tag_tools.py b/ansible_collections/arista/cvp/plugins/module_utils/tag_tools.py index 366faad98..2a8cc9404 100644 --- a/ansible_collections/arista/cvp/plugins/module_utils/tag_tools.py +++ b/ansible_collections/arista/cvp/plugins/module_utils/tag_tools.py @@ -110,7 +110,7 @@ def tasker(self, tags: list, mode: string, auto_create: bool = True): # create workspace my_date = datetime.now() - datetime_string = str(my_date.year)+str(my_date.month)+str(my_date.day)+'_'+str(my_date.hour)+str(my_date.minute)+str(my_date.second) + datetime_string = my_date.strftime('%Y%m%d_%H%M%S') workspace_name_id = "AW_" + ''.join(random.choices(string.ascii_uppercase + string.digits, k=6)) + datetime_string workspace_id = workspace_name_id