File tree Expand file tree Collapse file tree
eligibility_signposting_api/model Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -349,7 +349,7 @@ def iteration_datetime(self) -> datetime:
349349 msg = f"No iteration_time and no parent linked for iteration { self .id } "
350350 raise ValueError (msg )
351351
352- return datetime .combine (self .iteration_date , iteration_time )
352+ return datetime .combine (self .iteration_date , iteration_time ). replace ( tzinfo = UTC )
353353
354354 def __str__ (self ) -> str :
355355 return json .dumps (self .model_dump (by_alias = True ), indent = 2 )
Original file line number Diff line number Diff line change @@ -93,8 +93,10 @@ def display_current_iteration(result: RulesValidation) -> None:
9393 sys .stdout .write (
9494 f"{ YELLOW } Current active Iteration Number: { RESET } { GREEN } { current .iteration_number } { RESET } \n "
9595 )
96+ tz = current .iteration_datetime .tzinfo
9697 sys .stdout .write (
97- f"{ YELLOW } Current active Iteration's date&time: { RESET } { GREEN } { current .iteration_datetime } { RESET } \n "
98+ f"{ YELLOW } Current active Iteration's date&time: "
99+ f"{ RESET } { GREEN } { current .iteration_datetime } ({ tz } ){ RESET } \n "
98100 )
99101 except StopIteration :
100102 sys .stdout .write (f"{ YELLOW } No active iteration could be determined{ RESET } \n " )
@@ -118,9 +120,10 @@ def display_current_iteration(result: RulesValidation) -> None:
118120 sys .stdout .write (
119121 f"{ YELLOW } Next active Iteration Number: { RESET } { GREEN } { next_iteration .iteration_number } { RESET } \n "
120122 )
123+ tz = next_iteration .iteration_datetime .tzinfo
121124 sys .stdout .write (
122125 f"{ YELLOW } Next active Iteration's date&time: "
123- f"{ RESET } { GREEN } { next_iteration .iteration_datetime } { RESET } \n "
126+ f"{ RESET } { GREEN } { next_iteration .iteration_datetime } ( { tz } ) { RESET } \n "
124127 )
125128 except StopIteration :
126129 sys .stdout .write (f"{ YELLOW } No next active iteration could be determined{ RESET } \n " )
You can’t perform that action at this time.
0 commit comments