File tree Expand file tree Collapse file tree
backfill_dataset_service_date_range/src
process_validation_report/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -154,8 +154,12 @@ def backfill_datasets(session: "Session"):
154154 # It will not save the timezone in the database if it is None.
155155 formatting_timezone = extracted_timezone
156156 if formatting_timezone is None :
157+ logging .info ("No timezone found in the validation report." )
157158 formatting_timezone = timezone .utc
158159
160+ logging .info (
161+ f"Using the timezone: { formatting_timezone } for the service date range."
162+ )
159163 local_service_start_date = formatted_service_start_date .replace (
160164 hour = 0 , minute = 0 , tzinfo = formatting_timezone
161165 )
Original file line number Diff line number Diff line change @@ -166,7 +166,14 @@ def generate_report_entities(
166166 if isinstance (summary .get ("agencies" ), list ) and summary ["agencies" ]:
167167 extracted_timezone = summary ["agencies" ][0 ].get ("timezone" , None )
168168 if extracted_timezone is not None :
169+ logging .info (
170+ f"Timezone found in JSON report for dataset { dataset_stable_id } : { extracted_timezone } ."
171+ )
169172 dataset .agency_timezone = extracted_timezone
173+ else :
174+ logging .info (
175+ f"Timezone not found in JSON report for dataset { dataset_stable_id } ."
176+ )
170177
171178 for feature_name in json_report ["summary" ]["gtfsFeatures" ]:
172179 feature = get_feature (feature_name , session )
You can’t perform that action at this time.
0 commit comments