Decimal Hour Display in Task Coach

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:// taskcoach-svn

Henceforth, I’ll refer to the above directory as $TC_SVN_ROOT.

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:

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

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,

make deb

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!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.