diff --git a/parser.py b/parser.py index 3b7b495..97abe05 100644 --- a/parser.py +++ b/parser.py @@ -2,8 +2,11 @@ import requests import sys from datetime import datetime +import pytz -TODAY = datetime.now() +desired_timezone = pytz.timezone('America/Sao_Paulo') + +TODAY = datetime.now(desired_timezone) METRICS_SONAR = [ "files", @@ -31,7 +34,7 @@ f'{BASE_URL}{REPO}&metricKeys={",".join(METRICS_SONAR)}&ps=500' ) j = json.loads(response.text) - + file_path = f'./analytics-raw-data/fga-eps-mds-{REPO}-{TODAY.strftime("%m-%d-%Y-%H-%M-%S")}-{RELEASE_VERSION}.json' with open(file_path, "w") as fp: