handle timestamp more flexiable