From 35fb2a2dc695cf07ca2ad048a0d6492bc1bbea6c Mon Sep 17 00:00:00 2001 From: Eva Sebestova Date: Fri, 3 Nov 2023 19:02:17 +0100 Subject: [PATCH 1/2] Fix date in Azure v1 reports --- nise/__init__.py | 2 +- nise/generators/azure/azure_generator.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nise/__init__.py b/nise/__init__.py index 6c98004d..b6de30d0 100644 --- a/nise/__init__.py +++ b/nise/__init__.py @@ -1,3 +1,3 @@ -__version__ = "4.4.4" +__version__ = "4.4.5" VERSION = __version__.split(".") diff --git a/nise/generators/azure/azure_generator.py b/nise/generators/azure/azure_generator.py index 146b7de2..165e0fea 100644 --- a/nise/generators/azure/azure_generator.py +++ b/nise/generators/azure/azure_generator.py @@ -312,7 +312,7 @@ def _add_common_usage_info(self, row, start, end, **kwargs): row["BillingPeriodEndDate"] = self.last_day_of_month(start).strftime(DATE_FMT) else: row["SubscriptionGuid"] = self.subscription_guid - row["UsageDateTime"] = start + row["UsageDateTime"] = start.strftime(DATE_FMT) return row def _add_tag_data(self, row): From 713e9f4050a3df91003f1f58b010edef86132c18 Mon Sep 17 00:00:00 2001 From: Eva Sebestova Date: Fri, 3 Nov 2023 19:10:40 +0100 Subject: [PATCH 2/2] use datetime --- nise/generators/azure/azure_generator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nise/generators/azure/azure_generator.py b/nise/generators/azure/azure_generator.py index 165e0fea..38ace7fc 100644 --- a/nise/generators/azure/azure_generator.py +++ b/nise/generators/azure/azure_generator.py @@ -312,7 +312,7 @@ def _add_common_usage_info(self, row, start, end, **kwargs): row["BillingPeriodEndDate"] = self.last_day_of_month(start).strftime(DATE_FMT) else: row["SubscriptionGuid"] = self.subscription_guid - row["UsageDateTime"] = start.strftime(DATE_FMT) + row["UsageDateTime"] = start.strftime("%Y-%m-%d %H:%M:%S") return row def _add_tag_data(self, row):