By default, timetrace uses a 24-hour-format: It uses 15:00, not 3:00PM. This can be changed by adding use12hours: true to the timetrace configuration.
If you want to know the syntax for timetrace create record, you can print the help. It has the following syntax:
timetrace create record <PROJECT KEY> {<YYYY-MM-DD>|today|yesterday} <HH:MM> <HH:MM> [flags]
The problem:
That usage help doesn't consider the use12hours setting. If the 12-hour-format is used, the <HH:MM>s should become <HH:MMPM> to make clear that AM and PM have to be used.
The solution:
The core.Timetrace type and its configuration is available in all command functions in the cli package:
The configuration can be obtained using t.Config(), and that config has the Use12Hours field. If this field is true, the help text should be changed accordingly.
By default, timetrace uses a 24-hour-format: It uses
15:00
, not3:00PM
. This can be changed by addinguse12hours: true
to the timetrace configuration.If you want to know the syntax for
timetrace create record
, you can print the help. It has the following syntax:The problem:
That usage help doesn't consider the
use12hours
setting. If the 12-hour-format is used, the<HH:MM>
s should become<HH:MMPM>
to make clear thatAM
andPM
have to be used.The solution:
The
core.Timetrace
type and its configuration is available in all command functions in thecli
package:https://github.com/dominikbraun/timetrace/blob/683e27d6caa067acce2b516106d85fab8ba3c2a6/cli/create.go#L51
The configuration can be obtained using
t.Config()
, and that config has theUse12Hours
field. If this field istrue
, the help text should be changed accordingly.