Corrections
Correcting past mistakes...
In the previous section, you learned how commands cancel
, undo
, and delete
help you to undo previous database changes.
But sometimes you only want to change a specific interval, without having to re-enter it.
This is where the commands move
, lengthen
, shorten
, resize
, and modify
come in handy. Let’s apply them to your tracked time:
$ timew summary :ids
^[[4mWk^[[0m ^[[4mDate ^[[0m ^[[4mDay^[[0m ^[[4mID^[[0m ^[[4mTags ^[[0m ^[[4m Start^[[0m ^[[4m End^[[0m ^[[4m Time^[[0m ^[[4m Total^[[0m
W8 2025-02-23 Sun @8 SPORT 8:05:21 8:22:56 0:17:35
@7 PREPARATION 8:31:07 9:20:02 0:48:55
@6 HOME 9:23:00 9:54:28 0:31:28
@5 ERRANDS 10:00:00 10:48:00 0:48:00
@4 CLIENT 11:02:13 11:14:56 0:12:43
@3 CLIENT, PHONE 11:14:56 11:19:22 0:04:26
@2 CLIENT 11:19:22 11:34:07 0:14:45
@1 SPORT 11:39:00 12:00:00 0:21:00 3:18:52
^[[4m ^[[0m
3:18:52
$ ▒
Move
You see that you started your first task (@8
) not at 08:05
, but actually at 08:00
.
So let’s move the interval to the correct start time with the move
command:
$ timew move @8 08:00
Moved @8 to 2025-02-23T08:00:00
$ ▒
The move
command moves the interval to the specified start time without changing the interval length, so the end time is adjusted accordingly:
$ timew summary :ids
^[[4mWk^[[0m ^[[4mDate ^[[0m ^[[4mDay^[[0m ^[[4mID^[[0m ^[[4mTags ^[[0m ^[[4m Start^[[0m ^[[4m End^[[0m ^[[4m Time^[[0m ^[[4m Total^[[0m
W8 2025-02-23 Sun @8 SPORT 8:00:00 8:17:35 0:17:35
@7 PREPARATION 8:31:07 9:20:02 0:48:55
@6 HOME 9:23:00 9:54:28 0:31:28
@5 ERRANDS 10:00:00 10:48:00 0:48:00
@4 CLIENT 11:02:13 11:14:56 0:12:43
@3 CLIENT, PHONE 11:14:56 11:19:22 0:04:26
@2 CLIENT 11:19:22 11:34:07 0:14:45
@1 SPORT 11:39:00 12:00:00 0:21:00 3:18:52
^[[4m ^[[0m
3:18:52
$ ▒
Lengthen/Shorten
Now the interval starts at the correct time, but still you finished SPORT
at 08:22
, meaning the interval is now too short.
You can lengthen it with the lengthen
command:
$ timew lengthen @8 5mins
Lengthened @8 by 0:05:00
$ ▒
Of course, there is also a shorten
command.
Let’s apply it to interval @6
which only took 30 minutes, i.e. is 88 seconds too long:
$ timew shorten @6 88s
Shortened @6 by 0:01:28
$ ▒
Now the summary looks like this:
$ timew summary :ids
^[[4mWk^[[0m ^[[4mDate ^[[0m ^[[4mDay^[[0m ^[[4mID^[[0m ^[[4mTags ^[[0m ^[[4m Start^[[0m ^[[4m End^[[0m ^[[4m Time^[[0m ^[[4m Total^[[0m
W8 2025-02-23 Sun @8 SPORT 8:00:00 8:22:35 0:22:35
@7 PREPARATION 8:31:07 9:20:02 0:48:55
@6 HOME 9:23:00 9:53:00 0:30:00
@5 ERRANDS 10:00:00 10:48:00 0:48:00
@4 CLIENT 11:02:13 11:14:56 0:12:43
@3 CLIENT, PHONE 11:14:56 11:19:22 0:04:26
@2 CLIENT 11:19:22 11:34:07 0:14:45
@1 SPORT 11:39:00 12:00:00 0:21:00 3:22:24
^[[4m ^[[0m
3:22:24
$ ▒
Resize
When you know how much time you spent on a task, you can avoid the math to calculate how much you have to lengthen or shorten it by using the resize
command.
Let’s use this to correct the duration of interval @8
to 20 minutes
$ timew resize @8 20min
Resized @8 to 0:20:00
$ ▒
The resize
changes the duration of an interval to the given value, leaving the start time unchanged.
$ timew summary :ids
^[[4mWk^[[0m ^[[4mDate ^[[0m ^[[4mDay^[[0m ^[[4mID^[[0m ^[[4mTags ^[[0m ^[[4m Start^[[0m ^[[4m End^[[0m ^[[4m Time^[[0m ^[[4m Total^[[0m
W8 2025-02-23 Sun @8 SPORT 8:00:00 8:20:00 0:20:00
@7 PREPARATION 8:31:07 9:20:02 0:48:55
@6 HOME 9:23:00 9:53:00 0:30:00
@5 ERRANDS 10:00:00 10:48:00 0:48:00
@4 CLIENT 11:02:13 11:14:56 0:12:43
@3 CLIENT, PHONE 11:14:56 11:19:22 0:04:26
@2 CLIENT 11:19:22 11:34:07 0:14:45
@1 SPORT 11:39:00 12:00:00 0:21:00 3:19:49
^[[4m ^[[0m
3:19:49
$ ▒
Modify
While the commands before either move the whole interval or change its length, the modify
command can be used to change the start and end times of an interval independently:
To make interval @6
start at 09:21
and end at 09:51
, you can use the modify
command like follows:
$ timew modify start @6 09:21
$ timew modify end @6 09:51
$ ▒
Let’s have a look at the summary again:
$ timew summary :ids
^[[4mWk^[[0m ^[[4mDate ^[[0m ^[[4mDay^[[0m ^[[4mID^[[0m ^[[4mTags ^[[0m ^[[4m Start^[[0m ^[[4m End^[[0m ^[[4m Time^[[0m ^[[4m Total^[[0m
W8 2025-02-23 Sun @8 SPORT 8:00:00 8:20:00 0:20:00
@7 PREPARATION 8:31:07 9:20:02 0:48:55
@6 HOME 9:21:00 9:51:00 0:30:00
@5 ERRANDS 10:00:00 10:48:00 0:48:00
@4 CLIENT 11:02:13 11:14:56 0:12:43
@3 CLIENT, PHONE 11:14:56 11:19:22 0:04:26
@2 CLIENT 11:19:22 11:34:07 0:14:45
@1 SPORT 11:39:00 12:00:00 0:21:00 3:19:49
^[[4m ^[[0m
3:19:49
$ ▒
Now all your intervals have the correct start and end times.
Congratulations!
Congratulation, you have reached the end of the Beginner’s Guide. You should now have a basic understanding of how to track time with Timewarrior.
Move on to the documentation to see what else you can discover about Timewarrior.