Added PH for at and fixed problem with calculations based on variable times.