calculate time in sql query, easier to undestand; authored by gburton
Merge pull request #102 from haraldpdl/bugfix

calculate time in sql query, easier to undestand; authored by gburton