As a freelancer, it’s imperative that I keep track of my time spent per client. The problem, is that while Task Coach uses hour:minute:second to format effort totals, my invoicing/finance software, GnuCash, uses decimal hours. This makes transferring times from my Task Coach to my invoices a bit onerous.
I’ve looked around, and couldn’t find anything on how to make Task Coach use decimal hours, so I dug around in the source code and implemented it myself. The patch is below. This is a simple fix – there’s no settings for it, it simply switches the display of efforts to decimal hours.
The patch has been updated to include an entry in the preferences window to toggle the display type. See the updated post for the new patch.
This patch is against the subversion tree.
To use it, check out Task Coach from subversion:
# cd to your user src dir - i keep mine in ~/src cd /home/tom/src svn co svn://svn.code.sf.net/p/taskcoach/code/trunk taskcoach-svn
Henceforth, I’ll refer to the above directory as
Copy the patch text above into a file. For fun, let’s call it
tc_decimal_hours.patch and stick it in our home directory. Next, Apply the patch:
cd $TC_SVN_ROOT patch < ~/tc_decimal_hours.patch
Next up, we need to generate a few files, and run the patched version.
cd $TC_SVN_ROOT/taskcoach make prepare python taskcoach.py
Finally, generate a package for your operating system. This part is completely optional, and the build targets are all specified in
HACKING.txt in the root directory,
In my case, this will put a .deb in
$TC_SVN_ROOT/dist/ that I can use to install my modified version of Task Coach to my (Ubuntu) system.
That's all there is to it!