Updated sort mechanism to provide proper unix timestamp to MySQL DB.