diff --git a/playground/nutech/receipt/receipt.bpmn b/playground/nutech/receipt/receipt.bpmn index 74911ce6..4f13dab3 100644 --- a/playground/nutech/receipt/receipt.bpmn +++ b/playground/nutech/receipt/receipt.bpmn @@ -149,7 +149,7 @@ seconds = 0 days = 0 # Extract the value after "PT" -time_value_str = timer_value_tfc.split('PT')[1:] +time_value_str = timer_value_tfc.split('PT')[1] # Populate values based on the selected time format if time_format == "Hour(s)": @@ -160,14 +160,16 @@ elif time_format == "Second(s)": seconds = int(time_value_str[:-1]) if time_value_str[:-1].isdigit() else 0 elif time_format == "Day(s)": days = int(time_value_str[:-1]) if time_value_str[:-1].isdigit() else 0 + # Store the end result in variable timer_value_tfc as a tuple timer_value_tfc = (days, hours, minutes, seconds) -# Convert the tuple to a string -timer_value_tfc_str = str(timer_value_tfc) +# Convert the tuple to ISO 8601 string format +timer_value_tfc_str = f"PT{timer_value_tfc[1]}H{timer_value_tfc[2]}M{timer_value_tfc[3]}S" -# Now timer_value_tfc_str contains the string representation of the tuple -print(timer_value_tfc_str) +# Now timer_value_tfc_str contains the ISO 8601 string representation of the tuple +print(timer_value_tfc_str) +