Skip to content

Commit

Permalink
Merge pull request #157 from fccn/152-end-date-inclusive
Browse files Browse the repository at this point in the history
Shared revenue end date should be inclusive #152
  • Loading branch information
Tiago-da-silva23 authored Nov 2, 2023
2 parents 57b24d0 + fa74181 commit 56ef048
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import time
from datetime import datetime
from datetime import datetime, timedelta

from django.core.management.base import BaseCommand, CommandError, CommandParser

Expand Down Expand Up @@ -38,7 +38,9 @@ def handle(self, *args, **options) -> str | None:
start = time.time()
self.stdout.write("\nStarting file export...\n")
start_date = datetime.strptime(options["start_date"], "%d/%m/%Y")
end_date = datetime.strptime(options["end_date"], "%d/%m/%Y")
end_date = datetime.strptime(options["end_date"], "%d/%m/%Y") + (
timedelta(days=1) - timedelta(milliseconds=1)
)
product_id = options.get("product_id")
organization_code = options.get("organization_code")
kwargs = {
Expand Down

0 comments on commit 56ef048

Please sign in to comment.