Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,15 @@ def add_arguments(self, parser):

@staticmethod
def default_start_argument():
d = (datetime.today() - timedelta(days=1)).replace(day=1)
d = (datetime.now() - timedelta(days=1)).replace(day=1)
d = d.replace(hour=0, minute=0, second=0, microsecond=0)
return d
return pytz.utc.localize(d)

@staticmethod
def default_end_argument():
d = datetime.today()
d = datetime.now()
d = d.replace(hour=0, minute=0, second=0, microsecond=0)
return d
return pytz.utc.localize(d)

@staticmethod
def upload_to_s3(s3_endpoint, s3_bucket, file_location, invoice_month):
Expand Down Expand Up @@ -310,7 +310,7 @@ def process_invoice_row(allocation, attrs, su_name, rate):
logger.info(f"Uploading to S3 endpoint {options['s3_endpoint_url']}.")
self.upload_to_s3(
options["s3_endpoint_url"],
options["s3_bucket"],
options["s3_bucket_name"],
options["output"],
options["invoice_month"],
)