Skip to content

Commit

Permalink
Merge branch 'main' into plopezpe/add_static_subscription_name
Browse files Browse the repository at this point in the history
  • Loading branch information
lcouzens authored Aug 8, 2023
2 parents 834f051 + 7bd91d3 commit b2cf364
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions nise/generators/azure/azure_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@
"exchangeRateDate",
)

DATE_FMT = "%Y-%m-%d"


class AzureGenerator(AbstractGenerator):
"""Defines an abstract class for generators."""
Expand Down Expand Up @@ -305,9 +307,9 @@ def _add_common_usage_info(self, row, start, end, **kwargs):
row["BillingAccountName"] = self.account_info.get("billing_account_name")
row["BillingProfileId"] = self.account_info.get("billing_account_id")
row["BillingProfileName"] = self.account_info.get("billing_account_name")
row["Date"] = start.date().strftime("%m/%d/%Y")
row["BillingPeriodStartDate"] = self.first_day_of_month(start).strftime("%m/%d/%Y")
row["BillingPeriodEndDate"] = self.last_day_of_month(start).strftime("%m/%d/%Y")
row["Date"] = start.date().strftime(DATE_FMT)
row["BillingPeriodStartDate"] = self.first_day_of_month(start).strftime(DATE_FMT)
row["BillingPeriodEndDate"] = self.last_day_of_month(start).strftime(DATE_FMT)
else:
row["SubscriptionGuid"] = self.subscription_guid
row["UsageDateTime"] = start
Expand Down

0 comments on commit b2cf364

Please sign in to comment.