diff --git a/timeline_data.py b/timeline_data.py index ba6d15b2fed7a68a151dcf52c650840331b155e1..d5299c016c195ebc74b9a0b9222ed63648f29b7c 100644 --- a/timeline_data.py +++ b/timeline_data.py @@ -197,6 +197,12 @@ class IssueBoardTimeline: self.headers.append(stop_time) def write_to_csv(self): + # try again to make the header sorted + # self.headers[1:].sort() + sorted_headers = sorted(self.headers[1:]) + sorted_headers.insert(0, self.headers[0]) + self.headers = sorted_headers + # end try again with open(self.csv_filename, 'w', newline='') as csv_file: writer = csv.DictWriter(csv_file, fieldnames=self.headers) writer.writeheader() @@ -210,6 +216,7 @@ def get_tz_aware_datetime(datetime_string): timestamp = datetime.fromisoformat(datetime_string) if timestamp.tzinfo is None or timestamp.tzinfo.utcoffset(timestamp) is None: timestamp = datetime.fromisoformat(f'{datetime_string}+00:00') + # timestamp = datetime.fromisoformat(f'{datetime_string}-06:00') return timestamp @@ -227,8 +234,12 @@ if __name__ == '__main__': """ if __name__ == '__main__': + """ sprint_start = timezone('US/Central').localize(datetime(2019, 11, 20, 14, 30, 0, 0)) sprint_stop = timezone('US/Central').localize(datetime(2019, 12, 4, 14, 30, 0, 0)) + """ + sprint_start = timezone('US/Central').localize(datetime(2019, 12, 4, 14, 30, 0, 0)) + sprint_stop = timezone('US/Central').localize(datetime(2019, 12, 13, 12, 00, 0, 0)) with open('1198-capstones.json', mode='r') as json_file: capstones = json.load(json_file) for capstone in capstones: