Fix potential dead lock

A dead lock would have occur when comparing a class containing an
attribute which was also using the AutoCompare class.
Fix hour field in getCurrentTime