From 5c1399e9f281a67aa9905adf9d998171f66a20fd Mon Sep 17 00:00:00 2001 From: LASER-Yi Date: Mon, 4 Jul 2022 21:04:14 +0800 Subject: [PATCH] Fix #1894 --- frontend/src/components/forms/TimeOffsetForm.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/forms/TimeOffsetForm.tsx b/frontend/src/components/forms/TimeOffsetForm.tsx index cdd095bdc..132539bea 100644 --- a/frontend/src/components/forms/TimeOffsetForm.tsx +++ b/frontend/src/components/forms/TimeOffsetForm.tsx @@ -47,7 +47,12 @@ const TimeOffsetForm: FunctionComponent = ({ selections, onSubmit }) => { return (
{ - const action = convertToAction(hour, min, sec, ms); + let action: string; + if (positive) { + action = convertToAction(hour, min, sec, ms); + } else { + action = convertToAction(-hour, -min, -sec, -ms); + } selections.forEach((s) => task.create(s.path, TaskName, mutateAsync, {