hledger_timeclock(5)

πŸ“¦ version 1.19.1, in ubuntu jammy

πŸ’– hledger_timeclock β€” bestie's guide to the timeclock format πŸ’–

okay so this is the manual page for hledger_timeclock(5), part of the hledger user manuals, and it's all about the time logging format of timeclock.el, as read by hledger. yes bestie, we're logging our hours like it's a diary entry but make it ✨accounting✨.


🌸 NAME 🌸

Timeclock β€” the time logging format of timeclock.el, as read by hledger. periodt.


✨ DESCRIPTION ✨

so hledger can read timeclock files, no cap. just like with Ledger, these files are (a subset of) timeclock.el's format, and they hold clock-in and clock-out entries like the ones in the example down below. the date is a plain simple date. the time format is HH:MM[:SS][+-ZZZZ] β€” seconds and the timezone are optional, so you can be chill about them. the timezone, if you do include it, has to be four digits and it gets ignored (currently the time is always interpreted as a local time, so don't come for me about your world clock πŸ’€).

i 2015/03/30 09:00:00 some:account name  optional description after two spaces
o 2015/03/30 09:20:00
i 2015/03/31 22:21:45 another account
o 2015/04/01 02:00:34

hledger treats each clock-in/clock-out pair as a transaction posting some number of hours to an account. the way that works is so satisfying honestly. and if the session spans more than one day, it gets split into several transactions, one for each day β€” it's giving responsible bookkeeping. πŸŽ€

for the time log above, hledger print generates these journal entries:

$ hledger -f t.timeclock print
2015-03-30 * optional description after two spaces
    (some:account name)         0.33h

2015-03-31 * 22:21-23:59
    (another account)         1.64h

2015-04-01 * 00:00-02:00
    (another account)         2.01h

here is a sample.timeclock to download and some queries to try, bestie, go off:

$ hledger -f sample.timeclock balance                               # current time balances
$ hledger -f sample.timeclock register -p 2009/3                    # sessions in march 2009
$ hledger -f sample.timeclock register -p weekly --depth 1 --empty  # time summary by week

to generate time logs, ie to clock in and clock out, you could:

  • use emacs and the built-in timeclock.el, or the extended timeclock-x.el and perhaps the extras in ledgerutils.el β€” emacs girlies rise up πŸ’œ
  • at the command line, use these bash aliases:
alias ti="echo i `date '+%Y-%m-%d %H:%M:%S'` \$* >>$TIMELOG"
alias to="echo o `date '+%Y-%m-%d %H:%M:%S'` >>$TIMELOG"
  • or use the old ti and to scripts in the ledger 2.x repository. these rely on a "timeclock" executable which I think is just the ledger 2 executable renamed. iconic honestly.

🫢 REPORTING BUGS 🫢

report bugs at http://bugs.hledger.org (or on the #hledger IRC channel or hledger mail list). we wanna hear it, fr fr. πŸ›


πŸ‘‘ AUTHORS πŸ‘‘

Simon Michael <simon@joyful.com> and contributors. shoutout to the contributors, they ate. πŸ’…


Copyright (C) 2007-2019 Simon Michael. Released under GNU GPL v3 or later.


πŸ”₯ SEE ALSO πŸ”₯

hledger(1), hledger-ui(1), hledger-web(1), hledger-api(1), hledger_csv(5), hledger_journal(5), hledger_timeclock(5), hledger_timedot(5), ledger(1)

http://hledger.org


okay that's the whole vibe check, bestie β€” this was hledger 1.18.99, dated September 2020, and it's the hledger_timeclock(5) page from the hledger User Manuals. now go clock in, you main character πŸ¦‹βœ¨

πŸ“¦ where this page comes from