fixed incorrect calculation of 12h clock time