fixed database test programme crash
fixed the calculation of time according to German law