Those days nearly all project management applications can calculate the time that is being worked on projects to use them in various reports. If you are not using such a project management system and looking for a simpler solution just to track time, Kimai can be a good alternative.
It is a PHP-powered, open source web application that enables us to define projects/tasks and record the time we work on each item.
Although it is web-based, the timer keeps working even if the browser is closed unless it is stopped. After collecting the data, it can generate a report of your activities on demand (yearly, monthly, daily, by customer/project/action).
The application stores the data in a MySQL database and it has a multilingual interface.
Website: http://www.kimai.org/en/